Skip to content

docs: fix incorrect link in KR docs #28

docs: fix incorrect link in KR docs

docs: fix incorrect link in KR docs #28

name: Deploy Website
on:
push:
branches:
- master
- dev
workflow_dispatch:
inputs:
deploy-to-prod-env:
description: "Deploy to production environment"
default: false
required: true
type: boolean
jobs:
deploy:
timeout-minutes: 20
runs-on: ubuntu-latest
env:
DO_NOT_TRACK: 1
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Install dependencies
run: pnpm install
working-directory: "./website"
- name: Build
run: pnpm run build
working-directory: "./website"
- name: Set deployment environment
id: set-deployment-env
run: |
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]]; then
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
else
if [[ "${{ github.event.inputs.deploy-to-prod-env }}" == "true" ]]; then
echo "AZURE_TARGET_ENV=prod" >> $GITHUB_ENV
else
echo "AZURE_TARGET_ENV=dev" >> $GITHUB_ENV
fi
fi
- name: Show environment
run: echo ${{ env.AZURE_TARGET_ENV }}
- name: Deploy to Azure (prod)
id: deploy-prod
uses: Azure/static-web-apps-deploy@v1
if: env.AZURE_TARGET_ENV == 'prod'
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_MAA_WEBSITE }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./website/dist"
api_location: ""
skip_app_build: true
skip_api_build: true
- name: Deploy to Azure (dev)
id: deploy-dev
uses: Azure/static-web-apps-deploy@v1
if: env.AZURE_TARGET_ENV == 'dev'
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_MAA_WEBSITE }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
deployment_environment: dev
app_location: "./website/dist"
api_location: ""
skip_app_build: true
skip_api_build: true