Skip to content

Commit

Permalink
ci: update azure deploy config (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 28, 2024
1 parent 4ccc7f2 commit 714f472
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 14 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,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]
Expand All @@ -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"
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"vue": "^3.5.13"
},
"devDependencies": {
"@actions/core": "1.6.0",
"@actions/http-client": "^2.2.3",
"@nuxt/eslint": "0.7.0",
"@nuxt/test-utils": "3.14.4",
"@playwright/test": "1.48.2",
Expand Down
48 changes: 48 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 714f472

Please sign in to comment.