-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.14 KB
/
deploy.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
name: Deploy
on:
release:
types:
- released
branches:
- "root"
jobs:
deploy:
name: Deploy Github Pages
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@master
with:
submodules: "recursive"
fetch-depth: 0
- name: Setup Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x' # SDK Version to use
- name: Change base-tag
run: sed -i 's/<base href="\/" \/>/<base href="\/PaperMiniMaker\/" \/>/g' wwwroot/index.html
- name: Build Site
env:
GITHUB_USERNAME: qkmaxware
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet publish PaperMiniMaker.csproj -c Release -o .release
- name: Add .nojekyll file
run: touch .release/wwwroot/.nojekyll
- name: Custom 404
run: cp .release/wwwroot/index.html .release/wwwroot/404.html
- name: Commit to Github Pages
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: .release/wwwroot