-
Notifications
You must be signed in to change notification settings - Fork 202
51 lines (49 loc) · 1.26 KB
/
build-gh-pages.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
name: Publish Site
on:
push:
branches:
- master
paths-ignore:
- .github
- README.md
- LICENSE
jobs:
build-mtf-dot-wiki:
runs-on: ubuntu-22.04
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Generated Cache
uses: actions/cache@v3
with:
path: resources/_gen
key: ${{ runner.os }}-generated-${{ hashFiles('**') }}
restore-keys: ${{ runner.os }}-generated
- name: Build
run: hugo --minify --enableGitInfo
- name: Upload artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v1
with:
path: public
deploy-mtf-dot-wiki:
needs: build-mtf-dot-wiki
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1