-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 1.83 KB
/
Copy pathci_docs.yml
File metadata and controls
66 lines (61 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Build Documentation
on:
workflow_dispatch:
push:
branches:
- main
tags:
- v*
paths:
- docs/**/*
- examples/*
- pyproject.toml
- .github/workflows/ci_docs.yml
pull_request:
branches:
- main
paths:
- docs/**/*
- examples/*
- pyproject.toml
- .github/workflows/ci_docs.yml
permissions:
actions: write
contents: write
jobs:
docs:
defaults:
run:
shell: bash -e -l {0}
env:
branch_name: ${{ github.head_ref || github.ref_name }}
timeout-minutes: 30
name: linux-64
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup pixi env
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0
with:
pixi-version: "v0.69.0"
environments: docs
locked: false
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
- name: Generate docs
if: ${{ !github.event.act }}
run: |
pixi run -e docs docs-html
echo "DOC_VERSION=$(pixi run --locked -e docs python -c 'from workflowpy import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV
# - name: Upload to GitHub Pages
# if: ${{ github.event_name != 'pull_request' && !github.event.act }}
# uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/_build/html
# exclude_assets: .buildinfo,_sources/*,_examples/*.ipynb
# destination_dir: ./${{ env.DOC_VERSION }}
# keep_files: false
# full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages