2021-05-31 04:10:17 +00:00
|
|
|
name: Docs
|
2020-07-07 07:08:42 +00:00
|
|
|
on:
|
2021-05-22 06:09:14 +00:00
|
|
|
pull_request:
|
2021-05-31 04:10:17 +00:00
|
|
|
branches: [master]
|
2021-05-22 06:09:14 +00:00
|
|
|
types: [closed]
|
2020-07-07 07:08:42 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
GenerateDocs:
|
2021-05-22 06:09:14 +00:00
|
|
|
if: github.event.pull_request.merged == true
|
2021-05-31 03:59:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-07-07 07:08:42 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-02-20 03:56:43 +00:00
|
|
|
- name: Checkout Wiki
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2021-05-16 19:52:31 +00:00
|
|
|
repository: revarbat/BOSL2.wiki
|
2021-02-20 03:56:43 +00:00
|
|
|
path: BOSL2.wiki
|
2020-07-07 07:08:42 +00:00
|
|
|
|
2021-05-31 03:59:13 +00:00
|
|
|
- name: Apt Update
|
|
|
|
run: sudo apt update
|
2021-02-20 04:33:37 +00:00
|
|
|
|
2021-05-31 03:59:13 +00:00
|
|
|
- name: Install Packages
|
2021-06-01 00:42:01 +00:00
|
|
|
run: sudo apt-get install -y python3-pip python3-dev python3-setuptools python3-pil gifsicle
|
2020-07-07 07:08:42 +00:00
|
|
|
|
2021-05-31 03:59:13 +00:00
|
|
|
- name: Install openscad-docsgen
|
2021-02-20 03:56:43 +00:00
|
|
|
run: sudo pip3 install openscad_docsgen
|
|
|
|
|
2020-07-07 07:08:42 +00:00
|
|
|
- name: Install OpenSCAD
|
|
|
|
run: |
|
2021-05-31 03:59:13 +00:00
|
|
|
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
|
2021-05-31 23:59:01 +00:00
|
|
|
echo "::add-matcher::.github/openscad_docsgen.json"
|
2020-07-07 07:08:42 +00:00
|
|
|
|
2021-05-31 23:50:56 +00:00
|
|
|
- name: Generating Docs Headless
|
2021-06-01 00:09:18 +00:00
|
|
|
run: |
|
2021-06-01 00:34:29 +00:00
|
|
|
export OPENSCADPATH=$(dirname $GITHUB_WORKSPACE)
|
2021-06-01 00:09:18 +00:00
|
|
|
xvfb-run --server-args="-screen 0, 1280x720x24" -a \
|
|
|
|
openscad-docsgen -ticmI *.scad
|
2021-05-31 23:50:56 +00:00
|
|
|
|
|
|
|
- name: Commit Wiki Docs
|
2020-07-07 07:08:42 +00:00
|
|
|
run: |
|
2021-05-31 23:50:56 +00:00
|
|
|
cd $GITHUB_WORKSPACE/BOSL2.wiki
|
2021-02-20 04:02:24 +00:00
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2021-02-20 03:56:43 +00:00
|
|
|
git add --all
|
2021-02-27 02:01:34 +00:00
|
|
|
git commit -m "Wiki docs auto-regen." && git push || true
|
2020-07-07 07:08:42 +00:00
|
|
|
|
2021-02-20 03:56:43 +00:00
|
|
|
- name: Bump Release Version
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
./scripts/increment_version.sh
|
2021-02-20 04:02:24 +00:00
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2021-02-20 03:56:43 +00:00
|
|
|
git add version.scad
|
2021-02-27 02:01:34 +00:00
|
|
|
git commit -m "Bump release version." && git push || true
|
2020-07-07 07:08:42 +00:00
|
|
|
|