-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.21 KB
/
main.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
name: 🚀 Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches: [main]
paths: src/**
# pull_request:
# branches: [ main ]
# paths: src/**
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# permissions:
# contents: read
# pages: write
# id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: src
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: ⚙ Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
# include-prerelease: true
- name: ⬇️ Restore dependencies
working-directory: ./src
run: dotnet restore
- name: 🔨 Build
working-directory: ./src
run: dotnet build --no-restore
- name: 📦 Run
working-directory: ./src
run: dotnet run
# https://github.com/marketplace/actions/github-pages-action
- name: 🚀 Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src/output