-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (33 loc) · 1.35 KB
/
build.yml
File metadata and controls
36 lines (33 loc) · 1.35 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
name: Auto-build Procedure HTML
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build
shell: bash
working-directory: ./
run: |
echo "installing asciidoctor"
sudo apt-get install asciidoctor ruby -y
echo "Making deployment dir - docs/"
mkdir docs
# standards-assessment
asciidoctor standards-assessment/readme.adoc -o docs/standards-assessment/index.html
asciidoctor standards-assessment/procedure.adoc -o docs/standards-assessment/procedure.html
echo "Replace img links in standards-assessment procedure HTML"
sed -i 's#img src="#img src="https://iso-tc211.github.io/GOM/standards-assessment/#' docs/standards-assessment/procedure.html
mkdir -p docs/standards-assessment/reports
# process all *.adoc files in standards-assessment/reports/
find standards-assessment/reports/ -name '*.adoc' | while read file; do asciidoctor $file -o "docs/$(sed "s/.adoc/.html/" <<< "$file")"; done
mv docs/standards-assessment/reports/readme.html docs/standards-assessment/reports/index.html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages
FOLDER: docs