Skip to content

Commit 1eeb126

Browse files
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.
1 parent 4be5f7b commit 1eeb126

17 files changed

+43
-0
lines changed

.github/workflows/build.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build
2+
on: push
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
11+
- name: Build
12+
run: |
13+
go build -C src -o ../compiler
14+
./compiler -path references.bib > /dev/null
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy website
2+
on:
3+
push:
4+
branches:
5+
main
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
deploy-website:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install and Build
18+
run: |
19+
go build -C src -o ../compiler
20+
mkdir build
21+
mv assets build
22+
./compiler -path references.bib > build/index.html
23+
24+
- name: Deploy
25+
uses: JamesIves/github-pages-deploy-action@v4
26+
with:
27+
# Must be identical to where we wrote the HTML to.
28+
folder: build
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)