add workflows
This commit is contained in:
34
.gitea/workflows/docgen.yaml
Normal file
34
.gitea/workflows/docgen.yaml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user