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

[FIX] Build docs on release only #1183

Merged
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
16 changes: 11 additions & 5 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "build-docs"
on:
push:
branches: ["main"]
release:
types: [released]
pull_request:
branches: ["main"]
workflow_dispatch:
Expand Down Expand Up @@ -46,7 +46,9 @@ jobs:
run: cp nbs/mint.json _docs/mint.json && cp docs-scripts/imgs/* _docs/

- name: Deploy to Mintlify Docs
if: github.event_name == 'push'
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -56,7 +58,9 @@ jobs:
user_email: 41898282+github-actions[bot]@users.noreply.github.com

- name: Trigger mintlify workflow
if: github.event_name == 'push'
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}
Expand All @@ -72,7 +76,9 @@ jobs:
run: python docs-scripts/configure-redirects.py neuralforecast

- name: Deploy to Github Pages
if: github.event_name == 'push'
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down