Files
soulseek-rs-modded/.github/workflows/pages.yml
T
Michel de Graaf 35f50981ab ci: redeploy the site when a release changes the version it displays
website/vite.config.ts reads the root Cargo.toml at build time and stamps it
into __APP_VERSION__, which the footer and the page chrome render. Pages only
fired on `website/**`, and a release touches Cargo.toml and CHANGELOG.md and
nothing else, so the site never rebuilt for one: the footer kept advertising the
previous version until somebody happened to edit the website for other reasons.
That it currently reads v18.0.0 is luck — a docs commit landed the day after the
release.

Cargo.toml is left out of the pull_request paths on purpose. A dependency bump
changes nothing the site renders, and it is the deploy that needs the trigger.
2026-09-10 12:08:07 +02:00

73 lines
1.8 KiB
YAML

name: Pages
# The site stamps its footer version out of the root Cargo.toml at build time
# (website/vite.config.ts reads it into __APP_VERSION__), so a release that only
# touches Cargo.toml has to redeploy or the footer keeps advertising the previous
# version until someone happens to edit the site. Cargo.toml is deliberately not
# in the pull_request paths: a dependency bump there changes nothing the site
# renders, and the deploy is what needs the trigger.
on:
push:
branches: [master]
paths: ['website/**', '.github/workflows/pages.yml', 'Cargo.toml']
pull_request:
branches: ['**']
paths: ['website/**', '.github/workflows/pages.yml']
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install
run: bun install --frozen-lockfile
- name: Test installer
run: bun run test:install
- name: Typecheck
run: bun run typecheck
- name: Lint
run: bun run lint
- name: Build
run: bun run build
- uses: actions/upload-pages-artifact@v3
with:
path: website/dist
deploy:
name: Deploy
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: pages
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4