Skip to content

Commit fcb6c73

Browse files
committed
Test alternative deployment
1 parent 7bc5dd7 commit fcb6c73

File tree

3 files changed

+47
-20172
lines changed

3 files changed

+47
-20172
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Deploy
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.11'
16+
- name: Install the dependencies
17+
run: |
18+
python -m pip install -r requirements.txt
19+
- name: Assemble /content directory
20+
run: |
21+
cp README.md content
22+
curl https://github.com/HowTheyVote/data/releases/latest/download/export.zip
23+
unzip export.zip -d content/data/
24+
rm content/data/.keep
25+
- name: Build JupyterLite site
26+
run: jupyter lite build --contents content --output-dir dist
27+
- name: Upload artifact
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: ./dist
31+
32+
deploy:
33+
needs: build
34+
if: github.ref == 'refs/heads/main'
35+
permissions:
36+
pages: write
37+
id-token: write
38+
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

content/data/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)