-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (45 loc) · 1.23 KB
/
publish-docs.yml
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
name: Publish quil-py documentation
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install poetry
uses: snok/install-poetry@v1
- uses: Swatinem/rust-cache@v2
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --debug cargo-make
- name: Build quil-py documentation
uses: actions-rs/cargo@v1
with:
command: make
args: --cwd quil-py --makefile Makefile.toml docs
- name: Deploy preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: quil-py/build/docs
preview-branch: quil-py-docs
- name: Deploy docs
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: quil-py/build/docs
publish_branch: quil-py-docs