forked from ntv-one/rport
-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (43 loc) · 1.09 KB
/
build-docs.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: Build and deploy docs
on:
push:
branches:
- master
- docs
permissions:
contents: read
pages: write
id-token: write
jobs:
docs:
name: Build and deploy docs
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Markdown Lint
run: |
cd docs
npx markdownlint-cli content/
- name: Build with Hugo
run: |
pwd
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_0.101.0_Linux-64bit.tar.gz|tar xzf - hugo
mv hugo ~/
~/hugo --version||true
cd docs
test -e public||mkdir public
~/hugo --minify
find public
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './docs/public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main