-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (50 loc) · 1.41 KB
/
asciidoctor.yaml
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
name: "Build and deploy asciidoc to github pages"
on:
push:
branches:
- "main"
paths:
- "docs/**"
- ".github/workflows/asciidoctor.yaml"
jobs:
build_site:
name: "build asciidoc for github pages"
runs-on: ubuntu-latest
permissions:
pages: write
contents: write
defaults:
run:
shell: bash
working-directory: "docs"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install plantuml
run: "sudo gem install asciidoctor-diagram"
- name: Install asciidoctor
run: "sudo apt-get install asciidoctor"
- name: Install graphviz
run: "sudo apt-get install graphviz"
- name: Compile using asciidoctor
run: "asciidoctor -D ${{ github.workspace }}/build -r asciidoctor-diagram index.adoc"
- name: Print working directory for test
run: "pwd"
- name: Upload generated site
uses: actions/[email protected]
with:
name: site
path: "${{ github.workspace }}/build"
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
FOLDER: "build"
BRANCH: 'gh-pages'
COMMIT_MESSAGE: "[CI] Publisere dokumentasjon"