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.
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
|
@ -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
|
Before Width: | Height: | Size: 869 B After Width: | Height: | Size: 869 B |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 713 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
1
docs/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
hello world
|