Skip to content

Commit

Permalink
Adding asciidoctor workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wileyj committed Nov 27, 2023
1 parent 63004db commit af3f10a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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@v4
- 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 research/emissions-research/*.adoc
asciidoctor-pdf -D dist --theme research/emissions-research/pdf-theme.yml -a "!toc" research/emissions-research/*.adoc
- name: Setup Pages
uses: actions/configure-pages@vc
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "dist"
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_site
.jekyll-cache
.jekyll-cache
dist

0 comments on commit af3f10a

Please sign in to comment.