Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
name: Generate Stack-chan Schematics Files
on:
push:
branches:
- develop
- main
paths:
- '**/*.kicad_sch'
- '**/*.kicad_pcb'
- 'schematics/**/*.kibot.yaml'
- '.github/workflows/schematics.yml'
pull_request:
branches:
- develop
- main
paths:
- '**/*.kicad_sch'
- '**/*.kicad_pcb'
- 'schematics/**/*.kibot.yaml'
- '.github/workflows/schematics.yml'
permissions:
contents: read
concurrency:
group: schematics-${{ github.ref }}
cancel-in-progress: true
jobs:
build-schematics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- 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@v7
with:
name: schematics-files
path: generated
deploy-schematics:
needs: build-schematics
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
concurrency:
group: gh-pages-deploy
cancel-in-progress: false
permissions:
contents: write
steps:
- name: Checkout Pages branch
uses: actions/checkout@v7
with:
ref: gh-pages
- name: Download schematics files
uses: actions/download-artifact@v8
with:
name: schematics-files
path: ./schematics-files
- name: Update schematics files
run: |
if [ -z "$(find ./schematics-files -mindepth 1 -print -quit)" ]; then
echo "Schematics artifact is empty"
exit 1
fi
rm -rf ./web/schematics
mkdir -p ./web/schematics
cp -R ./schematics-files/. ./web/schematics/
- name: Commit schematics update
run: |
git config user.name 'GitHub Action'
git config user.email 'action@github.com'
git add ./web/schematics
if git diff --cached --quiet; then
echo "No schematics changes to deploy"
exit 0
fi
git commit -m "Deploy schematics files from ${{ github.sha }}"
git push origin HEAD:gh-pages
e96bf7eceThis file is pinned to the selected release. Download the original to open it in your design tool.