Skip to content

Commit

Permalink
ci: update azure deploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 28, 2024
1 parent 4ccc7f2 commit 6ea0456
Showing 1 changed file with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- renovate/*
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
Expand All @@ -15,29 +14,37 @@ jobs:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: false
- name: Install OIDC Client from Core Package
run: npm install @actions/[email protected] @actions/http-client
- name: Get Id Token
uses: actions/github-script@v6
id: idtoken
with:
script: |
const coredemo = require('@actions/core')
return await coredemo.getIDToken()
result-encoding: string
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
env:
PRE_BUILD_COMMAND: corepack enable
CUSTOM_BUILD_COMMAND: pnpm install && pnpm build || true
NODE_VERSION: 18.17.1
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_CLIFF_0ACDAF71E }}
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. ######
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: .output/server # Api source code path - optional
output_location: .output/public # Built app content directory - optional
# ##### End of Repository/Build Configurations ######
app_location: "/" # App source code path
api_location: ".output/server" # Api source code path - optional
output_location: ".output/public" # Built app content directory - optional
github_id_token: ${{ steps.idtoken.outputs.result }}
###### End of Repository/Build Configurations ######

- name: Clear Cloudflare cache
uses: Cyb3r-Jak3/[email protected]
Expand All @@ -54,5 +61,4 @@ jobs:
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_DELIGHTFUL_CLIFF_0ACDAF71E }}
action: close
action: "close"

0 comments on commit 6ea0456

Please sign in to comment.