Skip to content

Features/v1.4.4 (#84) #216

Features/v1.4.4 (#84)

Features/v1.4.4 (#84) #216

name: Azure Static Web Apps CI/CD
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
branches:
- master
jobs:
build_deploy_rc:
if: github.event_name == 'push' && github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') != true
runs-on: ubuntu-latest
name: Build and Deploy RC preview
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: Set preview version
run: echo "PACKAGE_VERSION=v${{ steps.package-version.outputs.current-version}}" >> $GITHUB_ENV
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_GLACIER_0A500D203 }}
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: "./demo_build" # Built app content directory - optional
app_build_command: "npm run build:demo"
###### End of Repository/Build Configurations ######
build_deploy_release:
if: (startsWith(github.ref, 'refs/tags/v') && github.event_name != 'pull_request')
runs-on: ubuntu-latest
name: Build and Deploy Release
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: Set release version
run: echo "PACKAGE_VERSION=v${{ steps.package-version.outputs.current-version}}" >> $GITHUB_ENV
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_GLACIER_0A500D203 }}
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: "./demo_build" # Built app content directory - optional
app_build_command: "npm run build:demo"
###### End of Repository/Build Configurations ######