Merge pull request 'ci: trigger CI on PR creation, gate build-docs to push/dispatch only' (#169) from ci/pr-trigger into main
This commit was merged in pull request #169.
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths: &ci-paths
|
||||||
- "docs/manual/**"
|
- "docs/manual/**"
|
||||||
- "docs/build-manual.py"
|
- "docs/build-manual.py"
|
||||||
- "docs/manualtools.py"
|
- "docs/manualtools.py"
|
||||||
@@ -16,6 +16,10 @@ on:
|
|||||||
- "completions/**"
|
- "completions/**"
|
||||||
- "integrations/**"
|
- "integrations/**"
|
||||||
- "tests/**"
|
- "tests/**"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths: *ci-paths
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
job:
|
job:
|
||||||
@@ -65,10 +69,16 @@ jobs:
|
|||||||
- name: Run fish config tests
|
- name: Run fish config tests
|
||||||
run: fish tests/run-tests.fish
|
run: fish tests/run-tests.fish
|
||||||
|
|
||||||
|
# PRs only need the test job as a gate -- build-docs commits generated
|
||||||
|
# files straight to the checked-out branch and deploys the Cloudflare
|
||||||
|
# Pages production site, neither of which should ever happen from a PR
|
||||||
|
# (PR content isn't main yet, and a fork/branch push shouldn't touch
|
||||||
|
# prod). It only runs on push to main or an explicit workflow_dispatch.
|
||||||
build-docs:
|
build-docs:
|
||||||
needs: test
|
needs: test
|
||||||
if: |
|
if: |
|
||||||
github.server_url != 'https://github.com' &&
|
github.server_url != 'https://github.com' &&
|
||||||
|
github.event_name != 'pull_request' &&
|
||||||
always() &&
|
always() &&
|
||||||
(github.event.inputs.job == 'build-docs' ||
|
(github.event.inputs.job == 'build-docs' ||
|
||||||
((github.event_name != 'workflow_dispatch' || github.event.inputs.job == 'all') &&
|
((github.event_name != 'workflow_dispatch' || github.event.inputs.job == 'all') &&
|
||||||
|
|||||||
Reference in New Issue
Block a user