Skip to content

Commit 08cccec

Browse files
committed
Set up preview deployment.
1 parent 83bbc41 commit 08cccec

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- website
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy:
15+
name: Deploy Website Preview
16+
runs-on: ubuntu-latest
17+
18+
environment:
19+
name: github-pages
20+
url: ${{steps.deployment.outputs.page_url}}
21+
22+
steps:
23+
- name: Checkout Code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
31+
- name: Install Dependencies
32+
run: |
33+
make dev-deps
34+
35+
- name: Build Website Preview
36+
run: |
37+
make build
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Upload Artifact
43+
uses: actions/upload-pages-artifact@v4
44+
with:
45+
path: 'build'
46+
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: usage check pytest qa build-deps check
1+
.PHONY: usage check pytest qa build-deps check build
22
usage:
33
@echo "Usage: make <target>, where target is one of:\n"
44
@echo "dev-deps: install Python dev dependencies"
@@ -22,3 +22,9 @@ qa:
2222

2323
pytest:
2424
tox -e py
25+
26+
build:
27+
mkdir -p build
28+
python build.py > build/index.html
29+
cp assets/pinout.css build/
30+
cp assets/pinout.js build/
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)