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
12 changes: 11 additions & 1 deletion .github/workflows/release-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Docs

on:
# Kept for a tag pushed by a human. A release cut through release.yaml pushes
# its tag with GITHUB_TOKEN, and GitHub does not start workflows from events
# that token creates - so release.yaml calls this workflow directly instead.
push:
tags:
- "*"
workflow_call:
inputs:
environment:
description: 'Deployment environment'
required: false
default: 'production'
type: string
workflow_dispatch:
inputs:
environment:
Expand Down Expand Up @@ -31,7 +41,7 @@ jobs:
- name: Deploy to Cloudflare Pages
uses: flowexec/action@v1
with:
executable: "deploy docs:cloudflare ${{ github.event.inputs.environment || 'production' }}"
executable: "deploy docs:cloudflare ${{ inputs.environment || 'production' }}"
timeout: '5m'
flow-version: 'main'
secrets: |
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_FLOW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_FLOW_GITHUB_TOKEN }}

# Publishing the docs is part of releasing: the site serves the JSON schemas
# that editors validate flowfiles against, so skipping it ships a release whose
# schema the world cannot see. This runs here rather than off the tag push
# because a tag pushed with GITHUB_TOKEN does not trigger workflows.
release-docs:
needs: release-binary
# Only for a dispatched release. A tag pushed by a human triggers
# release-docs.yaml on its own, and calling it here too would deploy twice.
if: github.event_name == 'workflow_dispatch'
permissions:
contents: read
uses: ./.github/workflows/release-docs.yaml
secrets: inherit