From 68b663de04b22d0fbb880b7b3c98e7276fa3eec5 Mon Sep 17 00:00:00 2001 From: grabowski Date: Mon, 8 Sep 2025 12:20:25 +0700 Subject: [PATCH] add workflows --- .gitea/workflows/docgen.yaml | 34 ++++++++++ .gitea/workflows/kibot_quick_start.yml | 90 ++++++++++++++++++++++++++ input.md | 77 ++++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 .gitea/workflows/docgen.yaml create mode 100644 .gitea/workflows/kibot_quick_start.yml create mode 100644 input.md diff --git a/.gitea/workflows/docgen.yaml b/.gitea/workflows/docgen.yaml new file mode 100644 index 0000000..0a390c5 --- /dev/null +++ b/.gitea/workflows/docgen.yaml @@ -0,0 +1,34 @@ +name: generate-docgen +on: + push: + branches: + - main +jobs: + build-and-test: + runs-on: kicad-docgen-runner + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Configure git + run: | + git config --global user.email "${{ gitea.actor }}@noreply.localhost" + git config --global user.name "${{ gitea.actor }}" + + - name: Generate html docgen + run: typecad-docgen input.md ./kicad/PowerModule/PowerModule.kicad_pcb + + - name: Commit and Push Changes + env: + GITEA_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + run: | + git add . + if ! git diff --cached --quiet; then + git commit -m "chore: update generated docs" + # Create HTTPS URL with token embedded + REPO_URL=$(git config --get remote.origin.url) + AUTHED_URL=${REPO_URL/https:\/\//https:\/\/${GITEA_TOKEN}@} + git push "$AUTHED_URL" HEAD:main + else + echo "No changes to commit" + fi \ No newline at end of file diff --git a/.gitea/workflows/kibot_quick_start.yml b/.gitea/workflows/kibot_quick_start.yml new file mode 100644 index 0000000..0e3a562 --- /dev/null +++ b/.gitea/workflows/kibot_quick_start.yml @@ -0,0 +1,90 @@ +name: "Variants demo using --quick-start" + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + paths: + - 'kicad/c64psu/*.kicad_sch' + - 'kicad/c64psu/*.kicad_pcb' + - '.gitea/workflows/kibot_quick_start.yml' + pull_request: + paths: + - 'kicad/c64psu/*.kicad_sch' + - 'kicad/c64psu/*.kicad_pcb' + - '.gitea/workflows/kibot_quick_start.yml' + repository_dispatch: + types: [run_qs] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + quick-start: + runs-on: kicad-kibot-runner + + steps: + + - uses: actions/checkout@v3 + with: + # So we can run a diff between last 2 changes + fetch-depth: '0' + + - name: Quick Start + run: | + kibot --quick-start + + - name: Retrieve results + uses: actions/upload-artifact@v3 + with: + name: Automatic_outputs + path: Generated + + # This step is to upload the results to another repo (web pages) + deploy: + runs-on: kicad-kibot-runner + needs: quick-start + + steps: + - uses: actions/checkout@v4 + + - name: Retrieve results + uses: actions/download-artifact@v3 + with: + name: Automatic_outputs + path: Generated + + - name: Disable Jekyll + # Jekyll will filter the KiRi folders + run: | + touch Generated/.nojekyll + + - name: Push to docu branch + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + # Set up git identity + git config --global user.email "${{ gitea.actor }}@noreply.localhost" + git config --global user.name "${{ gitea.actor }}" + + # Get the repository URL and add authentication + REPO_URL=$(git config --get remote.origin.url) + AUTHED_URL=${REPO_URL/https:\/\//https:\/\/${GITEA_TOKEN}@} + + # Clone the docu branch into a separate folder + git clone --depth 1 --branch docu "$AUTHED_URL" docu-branch || \ + git clone --depth 1 "$AUTHED_URL" docu-branch + + cd docu-branch + git checkout -B docu + + # Clean old contents and copy new files + rm -rf ./* + cp -r ../Generated/* ./ + + # Commit and push if there are changes + git add . + if ! git diff --cached --quiet; then + git commit -m "chore: update deployed documentation" + git push --force "$AUTHED_URL" docu + else + echo "No changes to deploy" + fi \ No newline at end of file diff --git a/input.md b/input.md new file mode 100644 index 0000000..c918337 --- /dev/null +++ b/input.md @@ -0,0 +1,77 @@ +--- +title: PowerModule +company: B4L Co. LTD. +board_name: PowerModule +variant: release +revision: A +date: 2024-03-30 +highlight: github-light +stylesheet: custom.css +kicad_theme: KiCAD Default +dark_mode: false +--- + +# Fabrication Notes + +| Stackup | Dimensions | Drills | +| :-------------------------------------: | :-------------------------------------------------------: | :----------------------------------: | +| ![{Stackup}](./images/stackup.png =550) | ![{Edge.Cuts,User.5,F.Fab}](./images/dimensions.png =350) | ![{Drill}](./images/drills.png =350) | + +1. FABRICATE PER IPC-6012A CLASS 2 +2. REFER TO ABOVE IMAGE FOR BOARD THICKNESSES, IMPEDANCE CONTROL, SOLDERMASK AND SURFACE FINISH DETAILS +3. VENDOR SHOULD FOLLOW ROHS COMPLIANT PROCESS AND Pb FREE FOR MANUFACTURING +4. PRINTED CIRCUIT BOARD SHALL COMPLY WITH REQUIREMENTS OF ANSI/J-STD-003 +5. FLATNESS REQUIREMENTS: TEST IN ACCORDANCE WITH THE CURRENT REVISION OF IPC-TM-650 2.4.22 +6. PCB MATERIAL REQUIREMENTS: Tg 170 C OR EQUIVALENT +7. ALL DIMENSIONS ARE IN MILLIMETERS UNLESS OTHERWISE SPECIFIED + +# Top Layer + +![{F.Cu}](./images/fcu.png =550) + +# Inner 1 Layer + +![{In1.Cu}](./images/in1cu.png =550) + + +# Inner 2 Layer + +![{In2.Cu}](./images/in2cu.png =550) + + +# Inner 3 Layer + +![{In3.Cu}](./images/in3cu.png =550) + + +# Inner 4 Layer + +![{In4.Cu}](./images/in4cu.png =550) + + +# Bottom Layer + +![{B.Cu}](./images/bcu.png =550) +_flipped_ + +# Renders + +| Top View | Bottom View | +| :--------------------------------------------------------: | :-------------------------------------------------------: | +| ![{Render/front/90/0/0}](./images/render-display.png =550) | ![{Render/bottom/0/0/360}](./images/back-render.png =550) | + +# Top Assembly + +| Top View | Render | +| :----------------------------------------------------------------: | :-----------------------------------------------: | +| ![{Edge.Cuts,F.Cu,F.Mask,F.Fab}](./images/front-assembly.png =550) | ![Front render](./images/render-display.png =550) | + +# Bottom Assembly + +| Bottom View | Render | +| :-------------------------------------------------------: | :---------------------------------------------: | +| ![{B.Cu,B.Mask,B.Fab}](./images/bottom-assembly.png =550) | ![Bottom render](./images/back-render.png =550) | + + + +