Skip to content

Generate Wiki Docs

Generate Wiki Docs #30

name: Generate Wiki Docs
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
RegenDocs:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v3
- name: CloneWiki
uses: actions/checkout@v3
with:
repository: jon-gilbert/openscad_attachable_text3d.wiki
path: openscad_attachable_text3d.wiki
- name: Clone BOSL2
uses: actions/checkout@v3
with:
repository: BelfrySCAD/BOSL2
path: ${{ github.workspace }}/BOSL2
- name: APT update
run: sudo apt update
- name: Install Required Libraries
run: sudo apt-get install python3-pip python3-dev python3-setuptools python3-pil gifsicle libfuse2
- name: Install openscad-docsgen
run: sudo pip3 install openscad-docsgen
- name: Install OpenSCAD
run: |
cd $GITHUB_WORKSPACE
wget https://files.openscad.org/OpenSCAD-2021.01-x86_64.AppImage
sudo mv OpenSCAD-2021.01*-x86_64.AppImage /usr/local/bin/openscad
sudo chmod +x /usr/local/bin/openscad
- name: Generate Wiki docs
uses: GabrielBB/[email protected]
env:
OPENSCADPATH: ${{ github.workspace }}/..
with:
run: openscad-docsgen -f
- name: manual git upload to wiki
run: |
cd openscad_attachable_text3d.wiki
git config user.name `git log -1 --pretty=format:"%an" "HEAD"`
git config user.email `git log -1 --pretty=format:"%ae" "HEAD"`
git add -A
git commit -m "Wiki doc update"
git push