Skip to content
Open
Show file tree
Hide file tree
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
26 changes: 16 additions & 10 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ on:
branches: [main]
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: "The environment to deploy to"
required: true
type: choice
default: "staging"
options:
- staging
- production

jobs:
build-docs:
Expand All @@ -30,8 +40,8 @@ jobs:
- name: Build Docs
run: make all_docs

- name: Deploy (Push to main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- name: Deploy (Push to main or Pull Request)
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'staging')
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -41,7 +51,7 @@ jobs:
user_email: 41898282+github-actions[bot]@users.noreply.github.com

- name: Deploy (Release)
if: github.event_name == 'release'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'production')
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -52,8 +62,8 @@ jobs:
tag_name: ${{ github.event.release.tag_name }}
tag_message: 'Documentation for release ${{ github.event.release.tag_name }}'

- name: Trigger mintlify workflow (Push to main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- name: Trigger mintlify workflow (Push to main or Pull Request)
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'staging')
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}
Expand All @@ -66,7 +76,7 @@ jobs:
});

- name: Trigger mintlify workflow (Release)
if: github.event_name == 'release'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'production')
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}
Expand All @@ -76,8 +86,4 @@ jobs:
repo: 'docs',
workflow_id: 'mintlify-action.yml',
ref: 'main',
inputs: {
version: '${{ github.event.release.tag_name }}',
is_release: 'true'
}
});
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,12 @@ checklink/cookies.txt
nbs/_extensions

# VSCode
*.code-workspace
*.code-workspace

docs/*.md
docs/**/*.mdx

docs-scripts
docs/mintlify/examples

.quarto
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ uv run pytest
- The docs are automatically generated from the docstrings in the utilsforecast folder.
- To contribute, ensure your docstrings follow the Google style format.
- Once your docstring is correctly written, the documentation framework will scrape it and regenerate the corresponding `.mdx` files and your changes will then appear in the updated docs.
- Make an appropriate entry in the `docs/mintlify/mint.json` file.
Loading