-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update azure deploy config (#83)
- Loading branch information
Showing
3 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- renovate/* | ||
pull_request: | ||
types: [opened, synchronize, reopened, closed] | ||
branches: | ||
|
@@ -15,29 +14,43 @@ 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 | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
submodules: true | ||
lfs: false | ||
node-version: 20 | ||
cache: pnpm | ||
- run: pnpm install --frozen-lockfile | ||
- 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 | ||
CUSTOM_BUILD_COMMAND: pnpm install && pnpm build | ||
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 | ||
skip_api_build: true | ||
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] | ||
|
@@ -54,5 +67,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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.