Skip to content

Commit

Permalink
Set up preview deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jun 17, 2024
1 parent 83bbc41 commit 08cccec
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
push:
branches:
- website

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
name: Deploy Website Preview
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Dependencies
run: |
make dev-deps
- name: Build Website Preview
run: |
make build
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload Artifact
uses: actions/upload-pages-artifact@v4
with:
path: 'build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: usage check pytest qa build-deps check
.PHONY: usage check pytest qa build-deps check build
usage:
@echo "Usage: make <target>, where target is one of:\n"
@echo "dev-deps: install Python dev dependencies"
Expand All @@ -22,3 +22,9 @@ qa:

pytest:
tox -e py

build:
mkdir -p build
python build.py > build/index.html
cp assets/pinout.css build/
cp assets/pinout.js build/
File renamed without changes.
File renamed without changes.

0 comments on commit 08cccec

Please sign in to comment.