-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (44 loc) · 1.34 KB
/
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
52
53
54
55
56
57
58
name: github pages
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.5.0
with:
hugo-version: '0.91.2'
# extended: true
- name: Copy template files
run: cp -r ./repositories/hugo-theme-docdock/* ./src/shared/themes/docdock
# VNEXT SITE
- name: vNext - Copy shared files to vNext documentation
run: cp -r ./src/shared/* ./src/vnext
- name: vNext - Remove previous output
run: rm -r ./docs/vnext
- name: vNext - Run Hugo
run: (cd ./src/vnext && hugo --minify)
# HOME SITE
- name: Home - Copy shared files to vNext documentation
run: cp -r ./src/shared/* ./src/home
# Note: don't delete previous output for home, it's the root
- name: Home - Run Hugo
run: (cd ./src/home && hugo --minify)
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Automatically generate site" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'master'