-
Notifications
You must be signed in to change notification settings - Fork 182
41 lines (35 loc) · 1.26 KB
/
documentation.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
# adapted from:
#
# * base code: https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/
# * fix push auth: https://github.com/ad-m/github-push-action
# * checkout PR head commit https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
name: documentation
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create output directories
run: |
mkdir -p output/reference
mkdir -p output/bugs
- name: Copy static website files
run: |
cp website/index.html output/index.html
cp website/style.css output/style.css
cp website/bugs/index.html output/bugs/index.html
- name: Generate reference
id: adocbuild
uses: tonynv/asciidoctor-action@master
with:
program: asciidoctor doc/index.adoc -o output/reference/index.html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: output # The folder the action should deploy.