mirror of
https://github.com/NullHypothesis/censorbib.git
synced 2025-07-29 09:18:47 -04:00
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.
This commit is contained in:
parent
4be5f7bfb2
commit
1eeb1267b3
17 changed files with 43 additions and 0 deletions
14
.github/workflows/build.yaml
vendored
Normal file
14
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
name: Build
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go build -C src -o ../compiler
|
||||
./compiler -path references.bib > /dev/null
|
28
.github/workflows/deploy-website.yaml
vendored
Normal file
28
.github/workflows/deploy-website.yaml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue