Skip to content

Latest hearings data: Mon Nov 18 11:31:49 +08 2024 #1173

Latest hearings data: Mon Nov 18 11:31:49 +08 2024

Latest hearings data: Mon Nov 18 11:31:49 +08 2024 #1173

Workflow file for this run

name: Deploy Datasette
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'docker/**'
- 'data/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.6
with:
lfs: true
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.2.2'
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Setup Babashka
uses: turtlequeue/setup-babashka@v1.6.0
with:
babashka-version: 1.3.190
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Cache db
id: cache-db
uses: actions/cache@v3
with:
path: ./data/data.db
key: cache-${{ hashFiles('input/**') }}-${{ hashFiles('scripts/**') }}
- name: Generate db
run: bb --main scripts.build-db
- uses: actions/cache@v2
with:
path: |
~/.npm
./app/node_modules
key: node-${{ hashFiles('./app/pnpm-lock.yaml') }}
- name: Install frontend dependencies
run: cd app && pnpm install --config.arch=x64 --config.platform=linux --config.libc=glibc
- name: Build frontend
run: |
cd app && pnpm exec tailwindcss -i ./styles/main.css -o ./dist/main.css --minify
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --detach
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}