Merge pull request from revarbat/revarbat_dev

Try to fix bad docs image generation by moving to Ubuntu VM.
This commit is contained in:
Revar Desmera 2021-05-30 21:11:44 -07:00 committed by GitHub
commit 4a2df3f6ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 65 additions and 13 deletions

View file

@ -1,14 +1,13 @@
name: CI
name: Docs
on:
pull_request:
branches:
- master
branches: [master]
types: [closed]
jobs:
GenerateDocs:
if: github.event.pull_request.merged == true
runs-on: macos-10.15
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
@ -19,27 +18,31 @@ jobs:
repository: revarbat/BOSL2.wiki
path: BOSL2.wiki
- name: Install gifsicle
run: brew install gifsicle
- name: Apt Update
run: sudo apt update
- name: Install Pillow
run: sudo pip3 install Pillow
- name: Install Packages
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
- name: Install Docsgen
- name: Install openscad-docsgen
run: sudo pip3 install openscad_docsgen
- name: Install gifsicle
run: sudo pip3 install gifsicle
- name: Install OpenSCAD
run: |
curl -L -o OpenSCAD.dmg https://files.openscad.org/snapshots/OpenSCAD-2021.05.07.dmg
hdiutil attach OpenSCAD.dmg
cp -a /Volumes/OpenSCAD/OpenSCAD.app /Applications/
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: Generating Docs
run: |
cd $GITHUB_WORKSPACE
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
echo "::add-matcher::.github/openscad_docsgen.json"
openscad-docsgen -m -i -t -c -I *.scad
openscad-docsgen -ticmI *.scad
cd BOSL2.wiki
git config user.name github-actions
git config user.email github-actions@github.com

49
.github/workflows/forced_docsgen.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: FDocs
on:
workflow_dispatch:
branches: [master]
jobs:
GenerateDocs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Wiki
uses: actions/checkout@v2
with:
repository: revarbat/BOSL2.wiki
path: BOSL2.wiki
- name: Apt Update
run: sudo apt update
- name: Install Packages
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
- name: Install openscad-docsgen
run: sudo pip3 install openscad_docsgen
- name: Install gifsicle
run: sudo pip3 install gifsicle
- 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: Generating Docs
run: |
cd $GITHUB_WORKSPACE
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
echo "::add-matcher::.github/openscad_docsgen.json"
openscad-docsgen -ticmIf *.scad
cd BOSL2.wiki
git config user.name github-actions
git config user.email github-actions@github.com
git add --all
git commit -m "Wiki docs auto-regen." && git push || true