Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/publish-web.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: publish-web
on:
# A release ends by pushing its docs to `web` with the bot's PAT, and a push
# made with a PAT does start workflows, so this covers releases too.
push:
branches:
- web
# Called by pull-request when specifically requested
# Called by `release` on a release, and by `tests` on a `pr-publish-web` label
workflow_call:
workflow_dispatch:

Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,25 @@ jobs:
# nexus_password: ${{ secrets.nexus_password }}
# directory: prql-java/java/

publish-web:
if: github.event_name == 'release'
uses: ./.github/workflows/publish-web.yaml
permissions:
contents: read
pages: write
id-token: write

# `web` tracks the latest release, so doc-only fixes backport onto it. A push
# with the default token starts no workflow, so `publish-web` is the release's
# only publish.
push-web-branch:
runs-on: ubuntu-24.04
environment: release
if: github.event_name == 'release'
permissions:
contents: write
steps:
- name: 📂 Checkout code
uses: actions/checkout@v7
with:
token: ${{ secrets.TEND_BOT_TOKEN }}
- run: git push origin HEAD:web --force

push-devcontainer:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ jobs:
publish-web:
uses: ./.github/workflows/publish-web.yaml
if: contains(github.event.pull_request.labels.*.name, 'pr-publish-web')
permissions:
contents: read
pages: write
id-token: write

nightly:
needs: rules
Expand Down
12 changes: 7 additions & 5 deletions web/book/src/project/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ the confidence to make changes faster, please raise an issue.

## Website

The website is published together with the book and the playground, and is
automatically built and released on any push to the `web` branch.
The website is published together with the book and the playground, from a
release's tag and from any later push to the `web` branch.

The `web` branch points to the latest release plus any website-specific fixes.
That way, the compiler behavior in the playground matches the latest release
Expand Down Expand Up @@ -498,9 +498,11 @@ Currently we release in a semi-automated way:
)"
```

4. From there, both the tag and release is created and all packages are
published automatically based on our
[release workflow](https://github.com/PRQL/prql/blob/main/.github/workflows/release.yaml).
4. From there the tag and release are created, and the
[release workflow](https://github.com/PRQL/prql/blob/main/.github/workflows/release.yaml)
publishes the packages and the website. Its publishing jobs sit behind the
`release` and `github-pages` environments, so approve the pending deployments
on the run's page.

5. Run
`cargo release patch --no-publish --no-push --execute --no-verify --no-confirm --no-tag && task prqlc:test-all && cargo insta test --accept -p mdbook-prql`
Expand Down
Loading