Skip to content

Commit 9578d04

Browse files
Create deploy-pages.yml github action for publishing documentation (#30)
* Create deploy-pages.yml github action for publishing documentation * Use poetry to manage dependencies for doc building --------- Co-authored-by: Frank Greguska <89428916+frankinspace@users.noreply.github.com>
1 parent 8c1ef5e commit 9578d04

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

.github/workflows/deploy-pages.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy documentation to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["develop"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
env:
25+
POETRY_VERSION: "1.3.1"
26+
PYTHON_VERSION: "3.10"
27+
28+
jobs:
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: getsentry/action-github-app-token@v2
36+
name: podaac cicd token
37+
id: podaac-cicd
38+
with:
39+
app_id: ${{ secrets.CICD_APP_ID }}
40+
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
41+
- uses: actions/checkout@v3
42+
with:
43+
repository: ${{ github.repository }}
44+
token: ${{ steps.podaac-cicd.outputs.token }}
45+
- uses: actions/setup-python@v4
46+
with:
47+
python-version: ${{ env.PYTHON_VERSION }}
48+
- name: Install Poetry
49+
uses: abatilo/actions-poetry@v2
50+
with:
51+
poetry-version: ${{ env.POETRY_VERSION }}
52+
53+
# Build the book
54+
- name: Build the book
55+
run: |
56+
poetry lock --no-update
57+
poetry run jupyter-book build docs/
58+
59+
- name: Setup Pages
60+
uses: actions/configure-pages@v3
61+
- name: Upload artifact
62+
uses: actions/upload-pages-artifact@v2
63+
with:
64+
# Upload only docs repository
65+
path: 'docs/_build/html'
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v2

docs/_config.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ bibtex_bibfiles:
2121

2222
# Information about where the book exists on the web
2323
repository:
24-
url: https://github.com/executablebooks/jupyter-book # Online location of your book
24+
url: https://github.com/podaac/hydrocron # Online location of your book
2525
path_to_book: docs # Optional path to your book, relative to the repository root
26-
branch: master # Which branch of the repository should be used when creating links (optional)
2726

2827
# Add GitHub buttons to your book
2928
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository

docs/requirements.txt

-3
This file was deleted.

0 commit comments

Comments
 (0)