-
-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (54 loc) · 1.57 KB
/
schematics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Generate Stack-chan Schematics Files
on:
push:
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
- '.github/workflows/schematics.yml'
pull_request:
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
- '.github/workflows/schematics.yml'
jobs:
build-schematics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: INTI-CMNB/KiBot@v2_k7
with:
config: schematics/m5-pantilt/m5-pantilt.kibot.yaml
schema: schematics/m5-pantilt/m5-pantilt.kicad_sch
board: schematics/m5-pantilt/m5-pantilt.kicad_pcb
dir: generated
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: schematics-files
path: generated
deploy-schematics:
needs: build-schematics
if: github.event_name == 'push' && github.ref == 'refs/heads/dev/v1.0'
runs-on: ubuntu-latest
steps:
- name: Checkout Pages Branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Download Schematics Files
uses: actions/download-artifact@v2
with:
name: schematics-files
path: ./schematics-files
- name: Move Files
run: |
mkdir -p ./web/schematics
rm -rf ./web/schematics/*
mv schematics-files/* ./web/schematics
- name: Commit and Push
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add .
git commit -m "Deploy schematics files from ${{ github.sha }}"
git push