5151 run-bench : ${{ steps.plan.outputs.run_bench }}
5252 run-zizmor : ${{ steps.plan.outputs.run_zizmor }}
5353 check-docs : ${{ steps.plan.outputs.check_docs }}
54+ publish-dev-docs : ${{ steps.plan.outputs.publish_dev_docs }}
5455 build-release-binaries : ${{ steps.plan.outputs.build_release_binaries }}
5556 build-docker : ${{ steps.plan.outputs.build_docker }}
5657 steps :
6970 HAS_BUILD_SKIP_DOCKER_LABEL : ${{ contains(github.event.pull_request.labels.*.name, 'build:skip-docker') }}
7071 HAS_BUILD_SKIP_RELEASE_LABEL : ${{ contains(github.event.pull_request.labels.*.name, 'build:skip-release') }}
7172 HAS_BUILD_RELEASE_LABEL : ${{ contains(github.event.pull_request.labels.*.name, 'build:release') }}
72- BASE_SHA : ${{ github.event.pull_request.base.sha }}
73+ BASE_SHA : ${{ github.event.pull_request.base.sha || github.event.before }}
7374 run : |
7475 [[ "$GH_REF" == "refs/heads/master" ]] && on_master_branch=1
7576 [[ "$HAS_SKIP_LABEL" == "true" ]] && has_skip_label=1
@@ -110,8 +111,9 @@ jobs:
110111 [[ ! $has_skip_label && ($any_rust_changed || $bench_related_changed || $on_master_branch) ]] && run_bench=1
111112 [[ ! $has_skip_label && ($workflow_changed || $zizmor_config_changed || $on_master_branch) ]] && run_zizmor=1
112113 [[ ! $has_skip_label && ($docs_related_changed || $on_master_branch) ]] && check_docs=1
113- [[ ! $has_skip_label && ! $has_build_skip_label && ! $has_build_skip_release_label && ($release_build_changed || $has_build_release_label) ]] && build_release_binaries=1
114- [[ ! $has_skip_label && ! $has_build_skip_label && ! $has_build_skip_docker_label && $docker_build_changed ]] && build_docker=1
114+ [[ $on_master_branch && $docs_related_changed ]] && publish_dev_docs=1
115+ [[ ! $on_master_branch && ! $has_skip_label && ! $has_build_skip_label && ! $has_build_skip_release_label && ($release_build_changed || $has_build_release_label) ]] && build_release_binaries=1
116+ [[ ! $on_master_branch && ! $has_skip_label && ! $has_build_skip_label && ! $has_build_skip_docker_label && $docker_build_changed ]] && build_docker=1
115117
116118 out() { [[ "$2" ]] && echo "$1=true" || echo "$1=false"; }
117119 {
@@ -120,6 +122,7 @@ jobs:
120122 out run_bench "$run_bench"
121123 out run_zizmor "$run_zizmor"
122124 out check_docs "$check_docs"
125+ out publish_dev_docs "$publish_dev_docs"
123126 out build_release_binaries "$build_release_binaries"
124127 out build_docker "$build_docker"
125128 } >> "${GITHUB_OUTPUT}"
@@ -203,6 +206,19 @@ jobs:
203206 uv run --group docs zensical build
204207 uv run --group docs llmstxt-standalone build
205208
209+ publish-dev-docs :
210+ needs :
211+ - plan
212+ - check-docs
213+ if : ${{ needs.plan.outputs.publish-dev-docs == 'true' }}
214+ permissions :
215+ contents : write
216+ id-token : write
217+ pages : write
218+ uses : ./.github/workflows/publish-docs.yml
219+ with :
220+ plan : " "
221+
206222 build-release-binaries :
207223 needs : plan
208224 if : ${{ needs.plan.outputs.build-release-binaries == 'true' }}
@@ -765,6 +781,7 @@ jobs:
765781 - check-release
766782 - check-zizmor
767783 - check-docs
784+ - publish-dev-docs
768785 - cargo-clippy-linux
769786 - cargo-clippy-windows
770787 - cargo-shear
0 commit comments