-
Notifications
You must be signed in to change notification settings - Fork 10
59 lines (46 loc) · 1.3 KB
/
asciidoctor-ghpages.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
59
name: Publish GitHub Pages
on:
workflow_dispatch:
push:
branches: [ main ]
env:
DEBIAN_FRONTEND: noninteractive
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install asciidoctor
run: |
sudo apt update
sudo apt install -y asciidoctor
sudo gem install asciidoctor asciidoctor-diagram rouge
- name: Build documentation
run: |
mkdir -p ./generated-html
asciidoctor -r asciidoctor-diagram docs/index.adoc -D ./generated-html
if [ -e docs/static ]; then cp -rf docs/static ./generated-html; fi
touch ./generated-html/.nojekyll
ls -la ./generated-html
cat ./generated-html/index.html
- name: Setup github pages
uses: actions/configure-pages@v3
- name: Upload artifacts
uses: actions/upload-pages-artifact@v2
with:
path: ./generated-html
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: $${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to github pages
id: deployment
uses: actions/deploy-pages@v2