main.yml 900 Bytes
Newer Older
k20066's avatar
k20066 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: asciidoctor-ghpages
on:
  push:
    paths:
      - 'docs/**'

jobs:
  build:
    runs-on: ubuntu-latest
    container: asciidoctor/docker-asciidoctor
    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
    - name: Generate HTML
      run: asciidoctor -b html5 -r asciidoctor-bibtex -a bibtex-file=docs/references.bib docs/adf-manual.adoc -o docs/index.html
    - name: Generate PDF
      run: asciidoctor-pdf -r asciidoctor-bibtex -r asciidoctor-mathematical -a bibtex-file=docs/references.bib -a mathematical-format=svg -a optimize -a pdf-theme=docs/resources/themes/manual.yml -a pdf-fontsdir=docs/resources/fonts docs/adf-manual.adoc -o docs/adf-manual.pdf
    - name: Deploy to GitHub Pages
      uses: crazy-max/ghaction-github-pages@v2
      with:
        target_branch: gh-pages
        build_dir: docs
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}