github: Update GitHub Pages deployment #14
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: Build and Deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout master | ||
uses: actions/checkout@master | ||
- name: Install build environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
docbook \ | ||
docbook-xml \ | ||
docbook-xsl \ | ||
docbook-xsl-doc-html \ | ||
docbook-xsl-doc-pdf \ | ||
docbook-xsl-doc-pdf \ | ||
librsvg2-bin \ | ||
pandoc \ | ||
texlive \ | ||
texlive-latex-extra \ | ||
xsltproc \ | ||
- name: Build HTML | ||
run: | | ||
make -C manuscript manual.html | ||
make -C manuscript index.html | ||
- name: Build PDF | ||
run: | | ||
make -C manuscript manual.pdf | ||
- name: Build EPUB | ||
run: | | ||
make -C manuscript manual.epub | ||
- name: Prepare GitHub Pages site | ||
run: | | ||
cp -a manuscript/index.html _site/ | ||
cp -a manuscript/manual.pdf _site/ | ||
cp -a manuscript/manual.epub _site/ | ||
cp -a manuscript/manual.html _site/ | ||
cp -a manuscript/manual.css _site/ | ||
cp -a manuscript/images _site/ | ||
- name: Upload _site to GitHub | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: github-pages | ||
path: _site | ||
deploy: | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |