-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.36 KB
/
docs.yml
File metadata and controls
48 lines (45 loc) · 1.36 KB
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Docs CI Build
on:
push:
branches: [ master ]
paths:
- "docs/**"
- ".github/workflows/docs.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout recursively
uses: actions/checkout@v2
with:
submodules: recursive # Fetch Hugo themes
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.73.0'
extended: true
- run: npm install
working-directory: './docs'
- name: Build docs
run: hugo --minify
working-directory: './docs'
env:
HUGO_ENV: production
- name: Upload docs packages
uses: actions/upload-artifact@v1
with:
name: acevortex-docs
path: docs/public/
- name: Deploy to Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/public