-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (40 loc) · 1.09 KB
/
publish.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
# This file is part of OpenScan-Hardware
# Copyright 2023 OpenScan Contributors
# SPDX-License-Identifier: CC-BY-SA-4.0
name: build-and-publish
on:
pull_request:
push:
branches:
- main
jobs:
book:
concurrency:
group: publish-gh-pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Lint
uses: pre-commit/[email protected]
- name: Build
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools
pip install -r book/requirements.txt
jupyter-book build book
- name: Publish
if: >-
github.repository == 'openscan-lsm/OpenScan-Hardware' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: book/_build/html
commit_message: Deploy book