Skip to content

Deploy website to SWA #5

Deploy website to SWA

Deploy website to SWA #5

Workflow file for this run

name: Deploy website to SWA
on:
workflow_dispatch:
# TODO: Configure deployment to automatically run on changes to `Website` project
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x"
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 22
- name: Log into Azure
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- run: |
cd src/Modkit/Website
dotnet tool restore
dotnet restore
npm ci
npm run build
- name: Build and deploy site
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
env:
PRE_BUILD_COMMAND: dotnet tool restore
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "/src/Modkit/Website/dist"
output_location: "/src/Modkit/Website"