Refactor CD workflow by removing kubectl and envsubst installation steps for streamlined deployment

This commit is contained in:
2025-10-02 15:48:55 +08:00
parent 669fa2626e
commit 4b372f8208

View File

@@ -50,27 +50,15 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Step 2: Install kubectl (Kubernetes CLI tool) # Step 2: Make CD script executable
- name: Install kubectl
uses: azure/setup-kubectl@v4
with:
version: 'latest'
# Step 3: Install envsubst (for environment variable substitution)
- name: Install envsubst
run: |
sudo apt-get update
sudo apt-get install -y gettext-base
# Step 4: Make CD script executable
- name: Make CD script executable - name: Make CD script executable
run: chmod +x script/cd.sh run: chmod +x script/cd.sh
# Step 5: Deploy to Kubernetes # Step 3: Deploy to Kubernetes
- name: Deploy to Kubernetes - name: Deploy to Kubernetes
run: ./script/cd.sh deploy run: ./script/cd.sh deploy
# Step 6: Output deployment summary # Step 4: Output deployment summary
- name: Deployment Summary - name: Deployment Summary
if: success() if: success()
run: | run: |
@@ -85,7 +73,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
echo "**Deployment Time:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_STEP_SUMMARY echo "**Deployment Time:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_STEP_SUMMARY
# Step 7: Output failure message # Step 5: Output failure message
- name: Deployment Failed - name: Deployment Failed
if: failure() if: failure()
run: | run: |