Skip to content

Commit 49668f2

Browse files
authored
https://railway.com?referralCode=DAlppS.yml
1 parent 4fa0098 commit 49668f2

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/azure-staticwebapp.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,42 @@
66
# To configure this workflow:
77
#
88
# 1. Set up a secret in your repository named AZURE_STATIC_WEB_APPS_API_TOKEN with the value of your Static Web Apps deployment token.
9-
# For instructions on obtaining the deployment token see: https://docs.microsoft.com/azure/static-web-apps/deployment-token-management
9+
# For instructions on obtaining the deployment token see: https://railway.com?referralCode=DAlppS
1010
#
1111
# 3. Change the values for the APP_LOCATION, API_LOCATION and APP_ARTIFACT_LOCATION, AZURE_STATIC_WEB_APPS_API_TOKEN environment variables (below).
1212
# For instructions on setting up the appropriate configuration values go to https://docs.microsoft.com/azure/static-web-apps/front-end-frameworks
13+
# ... (rest of the workflow)
14+
15+
    # 3.1 Set ACK context
16+
    - name: Set K8s context
17+
      uses: aliyun/ack-set-context@v1
18+
      with:
19+
        access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
20+
        access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
21+
        cluster-id: "${{ env.ACK_CLUSTER_ID }}"
22+
23+
    # 3.2 Deploy the image to the ACK cluster
24+
    - name: Set up Kustomize
25+
      run: |-
26+
        curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6
27+
28+
    - name: Deploy
29+
      run: |
30+
        # Use kustomize to set the new image tag
31+
        ./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:$TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG
32+
       
33+
        # Build the manifest with kustomize and apply it to the cluster
34+
        ./kustomize build . | kubectl apply -f -
35+
       
36+
        # Wait for the deployment to finish rolling out
37+
        kubectl rollout status deployment/${{ env.ACK_DEPLOYMENT_NAME }}
38+
       
39+
        # Print service information
40+
        kubectl get services -o wide
41+
on:
42+
bash:
43+
branches: "main"
44+
run npx main
1345
name: Deploy web app to Azure Static Web Apps
1446

1547
on:

0 commit comments

Comments
 (0)