Skip to content

Merge pull request #585 from OpenSAK-Org/merge-beta-to-1.15.0 #51

Merge pull request #585 from OpenSAK-Org/merge-beta-to-1.15.0

Merge pull request #585 from OpenSAK-Org/merge-beta-to-1.15.0 #51

Workflow file for this run

name: Deploy site
# Issue: this used to trigger only on `release: published`. But build.yml
# creates the GitHub Release using `secrets.GITHUB_TOKEN` (via
# softprops/action-gh-release) — and GitHub's anti-recursion rule means
# events produced *by* GITHUB_TOKEN never trigger other workflows in the
# same repo. So `release: published` has silently never fired for a single
# beta release; the June 25 ref-pinning fix corrected *what* would be
# deployed if this ran, but not *whether* it ran at all. Triggering on the
# tag push itself fixes that: `git push origin vX.Y.Z` is a normal,
# non-GITHUB_TOKEN push, so it fires like any other push event.
# `release: published` is kept as a secondary trigger for the rare case of
# manually editing/republishing a release by hand via the GitHub UI.
on:
push:
branches: [main]
tags:
- "v*"
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
name: "Deploy to GitHub Pages"
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# On a `release` event, checkout defaults to whatever's on the default
# branch (main) — NOT the tag that was actually released. That silently
# turned this into a no-op for every beta release, since main's site/
# only gets updated by an explicit manual sync. Pin the ref explicitly:
# release events deploy site/ exactly as it existed at the released
# tag (which lives on `beta` for betas), so the site always tracks
# whatever was just shipped without a manual sync step ever again.
# Plain pushes to main and manual workflow_dispatch runs keep their
# normal ref (github.ref) unaffected.
- uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }}
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: site/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5