-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (45 loc) · 1.02 KB
/
publish.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
name: Publish
on:
push:
branches:
- main
paths-ignore:
- .github
- .vscode
- README.md
- LICENSE
jobs:
build:
runs-on: ubuntu-20.04
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v2
- run: npx markdownlint-cli .
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Build
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: public
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1