Skip to content

use commit hash in actions and add dependabot updates #397

use commit hash in actions and add dependabot updates

use commit hash in actions and add dependabot updates #397

Workflow file for this run

name: "build-docs"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3
- name: Clone docs repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3
with:
repository: Nixtla/docs
ref: scripts
path: docs-scripts
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # ratchet:actions/setup-python@v4
with:
cache: "pip"
python-version: '3.10'
cache-dependency-path: settings.ini
- name: Build docs
run: |
set -ux
python -m pip install --upgrade pip
pip install -Uq nbdev
pip install -e ".[dev]"
mkdir nbs/_extensions
cp -r docs-scripts/mintlify/ nbs/_extensions/
python docs-scripts/update-quarto.py
echo "procs = nbdev_plotly.plotly:PlotlyProc" >> settings.ini
nbdev_docs
- name: Apply final formats
run: bash ./docs-scripts/docs-final-formatting.bash
- name: Copy over necessary assets
run: |
cp nbs/mint.json _docs/mint.json
cp docs-scripts/imgs/* _docs/
- name: Deploy to Mintlify Docs
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # ratchet:peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: docs
publish_dir: ./_docs
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
- name: Trigger mintlify workflow
if: github.event_name == 'push'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # ratchet:actions/github-script@v7
with:
github-token: ${{ secrets.DOCS_WORKFLOW_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'nixtla',
repo: 'docs',
workflow_id: 'mintlify-action.yml',
ref: 'main',
});
- name: Configure redirects for gh-pages
run: python docs-scripts/configure-redirects.py statsforecast
- name: Deploy to Github Pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # ratchet:peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./gh-pages
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com