Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move docs to run on PR merge #6805

Closed
wants to merge 1 commit into from
Closed
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
13 changes: 8 additions & 5 deletions .github/workflows/generate-cli-api-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# **what?**
# On push, if anything in core/dbt/docs or core/dbt/cli has been
# On merge, if anything in core/dbt/docs or core/dbt/cli has been
# created or modified, regenerate the CLI API docs using sphinx.

# **why?**
# We watch for changes in core/dbt/cli because the CLI API docs rely on click
# and all supporting flags/params to be generated. We watch for changes in
# core/dbt/docs since any changes to sphinx configuration or any of the
# .rst files there could result in a differently build final index.html file.
# .rst files there could result in a differently built final index.html file.

# **when?**
# Whenever a change has been pushed to a branch, and only if there is a diff
Expand All @@ -20,6 +20,8 @@ name: Generate CLI API docs

on:
pull_request:
types:
- closed

permissions:
contents: write
Expand All @@ -34,7 +36,7 @@ jobs:
check_gen:
name: check if generation needed
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.fork == false }}
if: github.event.pull_request.merged == true
outputs:
cli_dir_changed: ${{ steps.check_cli.outputs.cli_dir_changed }}
docs_dir_changed: ${{ steps.check_docs.outputs.docs_dir_changed }}
Expand Down Expand Up @@ -109,8 +111,9 @@ jobs:
runs-on: ubuntu-latest
needs: [check_gen]
if: |
needs.check_gen.outputs.cli_dir_changed == 'true'
|| needs.check_gen.outputs.docs_dir_changed == 'true'
(needs.check_gen.outputs.cli_dir_changed == true ||
needs.check_gen.outputs.docs_dir_changed == true) &&
github.event.pull_request.merged == true

steps:
- name: "[DEBUG] print variables"
Expand Down