Latest hearings data: Sat Apr 12 01:13:25 +08 2025 #1566
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Datasette | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docker/**' | |
- 'data/**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@v30 | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install nixpkgs#devenv | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
./app/node_modules | |
key: node-${{ hashFiles('./app/pnpm-lock.yaml') }} | |
- name: Cache db | |
id: cache-db | |
uses: actions/cache@v4 | |
with: | |
path: ./data/data.db | |
key: cache-${{ hashFiles('input/**') }}-${{ hashFiles('scripts/**') }} | |
- name: Generate db | |
run: devenv shell build-db | |
- name: Build frontend | |
run: devenv shell build-frontend | |
- name: deploy | |
run: devenv shell cd-deploy | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |