Skip to content

Fix sidebar layout by removing max-width constraint on manage pages #259

Fix sidebar layout by removing max-width constraint on manage pages

Fix sidebar layout by removing max-width constraint on manage pages #259

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
services:
db:
image: postgis/postgis:17-3.5
env:
POSTGRES_DB: book_corners
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgis://postgres:postgres@localhost:5432/book_corners
DJANGO_SECRET_KEY: ci-secret-key
DJANGO_DEBUG: "false"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install GIS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gdal-bin libgdal-dev libgeos-dev libproj-dev
sudo rm -rf /var/lib/apt/lists/*
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
- name: Build Tailwind CSS
run: |
npm ci
npm run build:css
- name: Run test suite
run: uvx nox -s tests
- name: Validate OpenAPI schema
run: uvx nox -s validate_openapi
e2e:
runs-on: ubuntu-latest
services:
db:
image: postgis/postgis:17-3.5
env:
POSTGRES_DB: book_corners
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgis://postgres:postgres@localhost:5432/book_corners
DJANGO_SECRET_KEY: ci-secret-key
DJANGO_DEBUG: "false"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install GIS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gdal-bin libgdal-dev libgeos-dev libproj-dev
sudo rm -rf /var/lib/apt/lists/*
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
- name: Build Tailwind CSS
run: |
npm ci
npm run build:css
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('requirements.txt') }}
- name: Run E2E browser tests
run: uvx nox -s e2e
deploy:
needs: [tests, e2e]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DOKKU_SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.DOKKU_HOST }} >> ~/.ssh/known_hosts
- name: Push to Dokku
run: |
git remote add dokku dokku@${{ secrets.DOKKU_HOST }}:book-corners
GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key" git push --force dokku master
- name: Sync ops scripts to VPS
continue-on-error: true
run: |
scp -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no \
scripts/backup.sh scripts/restore.sh \
deploy@${{ secrets.DOKKU_HOST }}:/tmp/
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no \
deploy@${{ secrets.DOKKU_HOST }} '
chmod +x /tmp/backup.sh /tmp/restore.sh
mv /tmp/backup.sh /home/deploy/backup.sh
mv /tmp/restore.sh /home/deploy/restore.sh
'
- name: Purge Cloudflare cache
run: |
curl -sf -X POST \
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'