Skip to content

Build and Deploy #17326

Build and Deploy

Build and Deploy #17326

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
test:
uses: ./.github/workflows/test.yml
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Geocode
run: |
uv run python ./geocode.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "locations.json"
- name: Fetch github issue reactions for RSVPs
run: |
uv run python ./fetch_github_issues.py # This outputs attendance reactions for the website to read in the next step - we do not commit them to avoid storing this data in git perpetually
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
uv run python ./ps.py &
while ! nc -z localhost 5000; do sleep 0.1; done; # Wait for server to start
mkdir output
wget -q -P output -nH --mirror --adjust-extension --page-requisites --no-parent http://127.0.0.1:5000
kill %1 # Kill the python server
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: output
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4