Update deploy.yml #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
deploy: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
- name: Install libxslt | |
run: sudo apt-get install libxslt1.1 libxslt1-dev libxml2-dev | |
- name: Install asciidoc | |
run: | | |
gem install asciidoctor | |
gem install asciidoctor-pdf | |
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3 --pre | |
- name: Build HTML | |
run: make history.html | |
- name: Build EPUB | |
run: make history.epub | |
- name: Build PDF | |
run: make history.pdf | |
- name: Prepare deployment | |
run: | | |
mkdir build/ | |
cp history.html build/index.html | |
cp history.pdf build/history.pdf | |
cp history.epub build/history.epub | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: 'build/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |