-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.2 KB
/
website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy website to SWA
on:
push:
branches:
- website
workflow_dispatch:
# TODO: Configure deployment to automatically run on changes to `Webiste` 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"