-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (31 loc) · 1.09 KB
/
main.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
name: CI
on:
push:
branches: [main]
jobs:
# Here I am assuming that the tests have been run on the PR
# Otherwise it could be possible that a direct push to main
# would not run the test code and still publish to PyPI
documentation-and-publish:
name: Build documentation and publish
runs-on: ubuntu-latest
# Always try to build the documentation!
# if: ${{ github.event_name == 'push' }}
steps:
- name: Set up Git
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v18
- run: nix develop --command build-docs
# always deploy github-pages if pushed to main
- name: Deploy 🚀
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
# This should be set via `just build`
folder: docs/_build
# do not touch the pr-preview generated files:
# https://github.com/rossjrw/pr-preview-action
clean-exclude: pr-preview/