Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/deploy-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,17 @@ on:
branches:
master

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: Set up flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
# Must be identical to where we wrote the HTML to.
folder: build
- name: Deploy to fly.io
run: flyctl deploy
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:1.26-alpine AS builder
WORKDIR /app
COPY src/ ./src/
COPY references.bib .
COPY assets/ ./assets/
RUN go build -C src -mod=vendor -o ../compiler
RUN ./compiler -path references.bib > index.html

FROM nginx:alpine
COPY --from=builder /app/assets /usr/share/nginx/html/assets
COPY --from=builder /app/index.html /usr/share/nginx/html/index.html
22 changes: 22 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for censorbib on 2026-06-16T12:27:53-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'censorbib'
primary_region = 'ord'

[build]

[http_service]
internal_port = 80
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '256mb'
cpus = 1
memory_mb = 256
2 changes: 1 addition & 1 deletion src/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var bibEntryTemplate = template.Must(template.New("bib-entry").Parse(`<li id="{{
<span class="icons">
{{if .DiscussionURL}}<a href="{{.DiscussionURL}}"><img class="icon" title="Online discussion" src="assets/discussion-icon.svg" alt="Discussion icon"></a>{{end}}
<a href="{{.URL}}"><img class="icon" title="Download paper" src="assets/pdf-icon.svg" alt="Download icon"></a>
<a href="https://censorbib.nymity.ch/pdf/{{.CiteName}}.pdf"><img class="icon" title="Download cached paper" src="assets/cache-icon.svg" alt="Cached download icon"></a>
<a href="https://censorbib-papers.t3.tigrisfiles.io/{{.CiteName}}.pdf"><img class="icon" title="Download cached paper" src="assets/cache-icon.svg" alt="Cached download icon"></a>
<a href="#bibtex-{{.CiteName}}" class="bibtex-link" data-reference="{{.CiteName}}" title="Show BibTeX" aria-label="Show BibTeX for {{.Title}}"><img class="icon" src="assets/bibtex-icon.svg" alt="BibTeX icon"></a>
<a href="#{{.CiteName}}"><img class="icon" title="Link to paper" src="assets/link-icon.svg" alt="Paper link icon"></a>
</span>
Expand Down
Loading