Skip to content

Commit

Permalink
Only trigger on push to master
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Oct 14, 2024
1 parent ebbb44a commit d5ba899
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: deploy-docs
on:
workflow_dispatch:
push:
branches:
- 'master'
pull_request:
permissions:
contents: write
Expand All @@ -12,12 +14,6 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
if: (github.event_name != 'pull_request')

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
Expand All @@ -41,9 +37,13 @@ jobs:
run: pip install -r tensorflow_serving/tools/pip_package/requirements-docs.txt

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
mkdocs gh-deploy --force
if: (github.event_name != 'pull_request')

- name: Build docs to check for errors
run: mkdocs build --verbose
run: |
mkdocs build
if: (github.event_name == 'pull_request')

0 comments on commit d5ba899

Please sign in to comment.