Skip to content

Commit

Permalink
ci: modify docs job to run on pull requests but only push on main
Browse files Browse the repository at this point in the history
This should ensure that docs will still build on any merge but only push the generated HTML once it hits main.
  • Loading branch information
Michael-J-Ward committed May 10, 2024
1 parent f6447f0 commit 47ce279
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
- main
tags-ignore:
- "**-rc**"
pull_request:
branches:
- main

name: Deploy DataFusion Python site

Expand All @@ -13,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set target branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
id: target-branch
run: |
set -x
Expand All @@ -27,6 +31,7 @@ jobs:
- name: Checkout docs sources
uses: actions/checkout@v3
- name: Checkout docs target branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down Expand Up @@ -64,6 +69,7 @@ jobs:
make html
- name: Copy & push the generated HTML
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
set -x
cd docs-target
Expand Down

0 comments on commit 47ce279

Please sign in to comment.