Skip to content

Merge pull request #486 from andrerserrano/patch-1 #23

Merge pull request #486 from andrerserrano/patch-1

Merge pull request #486 from andrerserrano/patch-1 #23

Workflow file for this run

name: Build and deploy to Github pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install asciidoctor
run: gem install asciidoctor asciidoctor-pdf
- name: Build html and pdf
run: |
asciidoctor -D dist whitepapers/*.adoc
asciidoctor-pdf -D dist --theme whitepapers/pdf-theme.yml -a "!toc" whitepapers/*.adoc
cp whitepapers/*.png dist/
mv dist/README.html dist/index.html
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1