Skip to content

Added some example scripts. #23

Added some example scripts.

Added some example scripts. #23

Workflow file for this run

name: Build and deploy gh-pages branch with Mkdocs
on:
push:
# Runs only if documentation is changed
paths:
- 'mkdocs.yml'
- 'docs/**'
# Runs every time main branch is updated
branches: ["main"]
# Runs every time a PR is open against main
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
# Prevent 2+ copies of this workflow from running concurrently
group: dts-docs-action
jobs:
Build-and-Deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0 # Needed, or else gh-pages won't be fetched, and push rejected
submodules: false # speeds up clone and not building anything in submodules
- name: Show action trigger
run: echo "= The job was automatically triggered by a ${{github.event_name}} event."
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: true
- name: Install Python 3.12
run: uv python install 3.12
- name: Build
run: uv run --dev mkdocs build --verbose
- if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'workflow_dispatch' }}
name: GitHub Pages action
uses: JamesIves/[email protected]
with:
# Do not remove existing pr-preview pages
clean-exclude: pr-preview
folder: ./site/
force: false # don't force-push, which overwrites previews
# If it's a PR from within the same repo, deploy to a preview page
# For security reasons, PRs from forks cannot write into gh-pages for now
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
name: Preview docs
uses: rossjrw/[email protected]
with:
source-dir: ./site/