Skip to content

Commit 1f0f393

Browse files
authored
Merge branch 'main' into docs-replace-callout
2 parents c87c72a + c2cafae commit 1f0f393

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.github/workflows/build-docs.yaml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7-
8-
env:
9-
QUARTO_PREVIEW: "1"
7+
release:
8+
types: [published]
109

1110
jobs:
1211
build-docs:
@@ -32,8 +31,18 @@ jobs:
3231
- name: Build Docs
3332
run: make all_docs
3433

35-
- name: Deploy
36-
if: github.event_name == 'push'
34+
- name: Deploy (Push to main or Pull Request)
35+
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
36+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_branch: docs-preview
40+
publish_dir: docs/mintlify
41+
user_name: github-actions[bot]
42+
user_email: 41898282+github-actions[bot]@users.noreply.github.com
43+
44+
- name: Deploy (Release)
45+
if: github.event_name == 'release'
3746
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3847
with:
3948
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -42,8 +51,21 @@ jobs:
4251
user_name: github-actions[bot]
4352
user_email: 41898282+github-actions[bot]@users.noreply.github.com
4453

45-
- name: Trigger mintlify workflow
46-
if: github.event_name == 'push'
54+
- name: Trigger mintlify workflow (Push to main or Pull Request)
55+
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request'
56+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
57+
with:
58+
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}
59+
script: |
60+
await github.rest.actions.createWorkflowDispatch({
61+
owner: 'nixtla',
62+
repo: 'docs',
63+
workflow_id: 'mintlify-action-preview.yml',
64+
ref: 'main',
65+
});
66+
67+
- name: Trigger mintlify workflow (Release)
68+
if: github.event_name == 'release'
4769
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4870
with:
4971
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,6 @@ uv run pytest
126126
* To contribute, ensure your docstrings follow the Google style format.
127127
* 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.
128128
* To contribute, examples/how-to-guides, make sure you submit clean notebooks, with cleared formatted LaTeX, links and images.
129-
* Make an appropriate entry in the `mint.json` file.
129+
* Make an appropriate entry in the `docs/mintlify/mint.json` file.
130+
* Run `make all_docs` to regenerate the documentation.
131+
* Run `make preview_docs` to view and test the documentation locally.

0 commit comments

Comments
 (0)