Skip to content

Commit 2683cf5

Browse files
authored
workflow for rendering
1 parent f7c8fef commit 2683cf5

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/3drender.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Render 3D Board Images
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
render:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Install KiCad 9
19+
run: |
20+
sudo add-apt-repository --yes ppa:kicad/kicad-9.0-releases
21+
sudo apt-get update
22+
sudo apt-get install --yes kicad-cli
23+
24+
- name: Create imgs directory
25+
run: mkdir -p imgs
26+
27+
- name: Render 3D Top
28+
run: |
29+
kicad-cli pcb render \
30+
--output imgs/board_3d_top.png \
31+
--side top \
32+
--quality high \
33+
--perspective \
34+
hardware/your_board.kicad_pcb
35+
36+
- name: Render 3D Bottom
37+
run: |
38+
kicad-cli pcb render \
39+
--output imgs/board_3d_bottom.png \
40+
--side bottom \
41+
--quality high \
42+
--perspective \
43+
hardware/your_board.kicad_pcb
44+
45+
- name: Commit renders
46+
run: |
47+
git config user.name "github-actions"
48+
git config user.email "github-actions@github.com"
49+
git add imgs/board_3d_top.png imgs/board_3d_bottom.png
50+
git commit -m "Update 3D renders [skip ci]" || echo "No changes"
51+
git push

0 commit comments

Comments
 (0)