Skip to content

Commit b092fda

Browse files
committed
ci: Add GitHub Actions workflow to build and deploy to GitHub Pages
1 parent 1ed843e commit b092fda

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '23' # Specify your Node.js version
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci # Use ci for cleaner installs in CI
32+
33+
- name: Build project
34+
run: npm build
35+
36+
- name: Build SVGs
37+
run: node public/dist/cli.js public/pinouts
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
# Upload entire directory
46+
path: './public'
47+
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The pins can be described by a simple YAML based description and the tool automa
3636

3737
### Web Editor
3838

39-
1. Go to FIXME
39+
1. Go to https://splitbrain.github.io/pinoutleaf/ (replace placeholders)
4040
2. Edit the YAML configuration in the editor.
4141
3. The SVG diagrams will update automatically.
4242
4. Click the images to download them
@@ -61,11 +61,11 @@ Check the [pinouts](public/pinouts) directory for boards that have already been
6161
```bash
6262
npm install
6363
```
64-
2. Build the project (for web editor and CLI):
64+
3. Build the project (for web editor and CLI):
6565
```bash
6666
node build.js
6767
```
68-
3. Run the CLI tool with configuration files or directories as arguments:
68+
4. Run the CLI tool with configuration files or directories as arguments:
6969
```bash
7070
node public/dist/cli.js path/to/your/config.yaml
7171
```

0 commit comments

Comments
 (0)