Skip to content

Bug: previous bug fix only works in Azure DevOps; not GitHub actions #25

Bug: previous bug fix only works in Azure DevOps; not GitHub actions

Bug: previous bug fix only works in Azure DevOps; not GitHub actions #25

name: Azure SWA CI/CD (dev)
on:
push:
branches:
- dev
jobs:
build_and_deploy_job:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment:
name: dev
url: https://dev.jimm.my
name: Build and Deploy (dev)
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
lfs: false
- name: Setup Node v18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Dependencies
run: npm ci
- name: Build SWA
run: npm run build
- name: Deploy (skip build)
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_FLOWER_0D5B30B10 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######
###### WORKAROUND Node 18 unsupported by Oryx: Build separately using NodeTool@0 and Npm@1; skip build & use external build in Azure SWA Deploy ######
skip_api_build: true
skip_app_build: true
is_static_export: true
###### End of WORKAROUND Node 18 unsupported by Oryx ######