-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (46 loc) · 1.27 KB
/
deploy-playground.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
51
52
53
54
55
56
57
58
name: 'Deploy playground to GitHub Pages'
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'src/**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
deployments: write
jobs:
deploy:
runs-on: ubuntu-latest
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Clone the repo
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 18
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Run tests
run: dotnet test ./src
- name: Publish with dotnet
working-directory: 'src/Draco.Editor.Web'
run: dotnet publish --configuration Release --output build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: 'src/Draco.Editor.Web/build/wwwroot'
- name: Deploy GitHub Pages site
uses: actions/[email protected]