Merge pull request #13 from lightclient/ci-fixup #6
This file contains hidden or 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 static site | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y make pandoc texlive texlive-xetex texlive-fonts-recommended texlive-plain-generic build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev | |
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH | |
cabal install pandoc-sidenote | |
- name: Run Makefile | |
run: make | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/ | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |