Skip to content

Commit 4be3c25

Browse files
authored
Merge pull request #87 from LibraryOfCongress/feature/github-actions-build
Automate the Github Pages build process
2 parents 4dec798 + 939c8d9 commit 4be3c25

508 files changed

Lines changed: 56 additions & 1935414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: deploy-book
2+
3+
# Run this when the master or main branch changes
4+
on:
5+
push:
6+
branches:
7+
- master
8+
9+
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
10+
jobs:
11+
deploy-book:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pages: write
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
# Install dependencies
20+
- name: Set up Python
21+
uses: actions/setup-python@v6
22+
with:
23+
python-version: "3.13"
24+
cache: pip # Implicitly uses requirements.txt for cache key
25+
26+
- name: Install dependencies
27+
run: pip install -r requirements.txt
28+
29+
# (optional) Cache your executed notebooks between runs
30+
# if you have config:
31+
# execute:
32+
# execute_notebooks: cache
33+
# - name: cache executed notebooks
34+
# uses: actions/cache@v4
35+
# with:
36+
# path: _build/.jupyter_cache
37+
# key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}
38+
39+
# Build the book
40+
- name: Build the book
41+
run: |
42+
jupyter-book build --all .
43+
44+
# https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
45+
46+
# Upload the book's HTML as an artifact
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v4
49+
with:
50+
path: _build/html
51+
52+
# Deploy the book's HTML to GitHub Pages
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

_build/html/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

_build/html/.nojekyll

Whitespace-only changes.

_build/html/Chronicling America API/ChronAm API Samples.html

Lines changed: 0 additions & 790 deletions
This file was deleted.

_build/html/Chronicling America API/README.html

Lines changed: 0 additions & 504 deletions
This file was deleted.

_build/html/Chronicling America API/chronam_all_digitized/README.html

Lines changed: 0 additions & 546 deletions
This file was deleted.

_build/html/Chronicling America API/chronam_issue_counts/README.html

Lines changed: 0 additions & 551 deletions
This file was deleted.

_build/html/Data Packages/README.html

Lines changed: 0 additions & 565 deletions
This file was deleted.

_build/html/Data Packages/austro-hungarian-maps.html

Lines changed: 0 additions & 706 deletions
This file was deleted.

_build/html/Data Packages/digitized-books.html

Lines changed: 0 additions & 854 deletions
This file was deleted.

0 commit comments

Comments
 (0)