censorbib/.github/workflows/deploy-website.yaml
Philipp Winter 1eeb1267b3 Add workflows to build and deploy.
This commit adds two GitHub workflows that build and deploy CensorBib.

The "build" workflow is run on every push and verifies the validity of
the .bib file -- as seen by our build tool and *not* by LaTeX!

The "deploy" workflow is run whenenver a branch is merged into master,
at which point CensorBib is automatically built and deployed via GitHub
pages.  This means has two advantages:

* First, I no longer need to manually build and deploy CensorBib, and
  can point the domain censorbib.nymity.ch to GitHub pages.

* Second, CensorBib will also be available under
  https://nullhypothesis.github.io/censorbib/
  which may be helpful to users for who my domain is blocked.
2024-03-10 12:08:10 -05:00

28 lines
583 B
YAML

name: Deploy website
on:
push:
branches:
main
permissions:
contents: write
jobs:
deploy-website:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install and Build
run: |
go build -C src -o ../compiler
mkdir build
mv assets build
./compiler -path references.bib > build/index.html
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
# Must be identical to where we wrote the HTML to.
folder: build