mirror of
https://github.com/NullHypothesis/censorbib.git
synced 2025-08-03 20:04:10 -04:00

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.
28 lines
583 B
YAML
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
|