-
-
Notifications
You must be signed in to change notification settings - Fork 27
85 lines (73 loc) · 1.94 KB
/
docs.yml
File metadata and controls
85 lines (73 loc) · 1.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Docs
on:
push:
branches:
- master
- docs
paths:
- '**/docs.yml'
- docs/**
# ignore
- '!**/build.yml'
pull_request:
branches:
- master
paths:
- '**/docs.yml'
- docs/**
# ignore
- '!**/build.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PATH_DOC: ${{ github.workspace }}/emacs-eask.github.io
jobs:
publish-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- uses: actions/setup-node@v6
with:
node-version: 22
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.134.2'
- name: Build theme
working-directory: ./docs/themes/geekdoc
run: |
npm install
npm run build
- name: Check out GitHub page repo
uses: actions/checkout@v6
if: github.ref == 'refs/heads/master'
with:
repository: emacs-eask/emacs-eask.github.io
path: ${{ env.PATH_DOC }}
token: ${{ secrets.PAT }}
- name: Clean up before the build
working-directory: ${{ env.PATH_DOC }}
continue-on-error: true
run: git rm -r '*'
- name: Build doc artifacts with Hugo
working-directory: docs
run: |
mkdir -p ${{ env.PATH_DOC }}
hugo --destination ${{ env.PATH_DOC }} --minify
# TODO: Generate better commit message
- name: Publish doc artifacts
if: github.ref == 'refs/heads/master'
working-directory: ${{ env.PATH_DOC }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -F- <<-_UBLT_COMMIT_MSG_
auto: ${{ github.event.head_commit.message }}
SourceCommit: https://github.com/emacs-eask/cli/commit/${{ github.sha }}
_UBLT_COMMIT_MSG_
git push