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
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# On a pull request the site is built and uploaded as an artifact only, so a broken catalog fails before the tag.
#
# No swift-docc-plugin: the kit adds no package dependency for its docs. `xcodebuild docbuild` builds the archives
# from the package's own schemes; `docc merge` (Xcode 16+) joins them. Needs Pages enabled with source "GitHub Actions"
# (repository Settings > Pages). Copied from CuboKit's pattern; the module list is read from the .docc catalogs.
# from the package's own schemes; `docc merge` (Xcode 16+) joins them. Pages source is "GitHub Actions" and the
# github-pages environment allows tags `*.*.*`. A release-please tag pushed with GITHUB_TOKEN (no org release app)
# starts no workflow, so release-please.yml then dispatches this workflow on the new tag. Copied from CuboKit's
# pattern; the module list is read from the .docc catalogs.
name: Docs

on:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# workflows. With the app token CI runs on the Release PR like on any PR, and the tag runs the tag workflows.
# Without the app (variable unset) the job falls back to GITHUB_TOKEN and dispatches CI on the Release PR's branch. Step
# env is evaluated even when `if` skips the step, so the PR JSON is read with jq rather than fromJSON (empty on a run with
# no Release PR). Needs "Allow GitHub Actions to create and approve pull requests".
# no Release PR). Without the app the tag starts no workflow either, so the job dispatches Docs on the new tag
# (`github.ref` is then `refs/tags/<version>`, so its deploy job publishes to Pages). Needs "Allow GitHub Actions to
# create and approve pull requests".
name: release-please

on:
Expand Down Expand Up @@ -63,3 +65,9 @@ jobs:
env:
PR: ${{ steps.release.outputs.pr }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish the docs for the new tag
if: steps.release.outputs.release_created && steps.app.outputs.token == ''
run: gh workflow run docs.yml --repo "$GITHUB_REPOSITORY" --ref "$TAG"
env:
TAG: ${{ steps.release.outputs.tag_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading