Add actions (WIP)

This commit is contained in:
Jeff Epler 2020-08-08 10:54:15 -05:00
parent 0bd022b8b2
commit ae128fa62f

33
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Build and Publish Website
on:
push:
pull_request:
release:
types: [published]
check_suite:
types: [rerequested]
jobs:
build:
runs-on: ubuntu-18.04
container: debian:buster
steps:
- name: install dependencies
run: |
apt-get update
apt-get --no-install-recommends -y install admesh imagemagick jekyll make openscad python3 python3-yaml xvfb xauth
- name: checkout
uses: actions/checkout@v2
- name: build
run: |
xvfb-run make V=2 -O -j$(nproc) jekyll
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: publish
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url --push origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
make -O V=1 publish