Skip to content

Commit 1e06c8a

Browse files
authored
Create deploy-book.yml
0 parents  commit 1e06c8a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/deploy-book.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: deploy-book
2+
3+
# Run on pushes to main, 5:30pm, or when I say so
4+
on:
5+
schedule:
6+
- cron: '30 17 * * *'
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
12+
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
13+
jobs:
14+
deploy-book:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
pages: write
18+
id-token: write
19+
contents: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
# Install dependencies
24+
- name: Set up Python 3.8
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.8
28+
29+
- name: Get the main book
30+
uses: actions/checkout@v3
31+
with:
32+
repository: COBA-NIH/MicroscopyForBeginnersReferenceGuide
33+
path: book
34+
35+
- name: Install dependencies
36+
run: |
37+
pip install -r book/requirements.txt
38+
39+
# Build the book
40+
- name: Build the book
41+
run: |
42+
jb config sphinx book
43+
sphinx-build -b html -D language=es book book/_build/html
44+
rm book/conf.py
45+
46+
# Push the book's HTML to github-pages
47+
- name: GitHub Pages action
48+
uses: peaceiris/actions-gh-pages@v3.6.1
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
publish_dir: book/_build/html
52+
cname: es.bioimagingguide.org

0 commit comments

Comments
 (0)