44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Build CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
release:
|
|
types: [published]
|
|
check_suite:
|
|
types: [rerequested]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get --no-install-recommends -y install build-essential git cc65
|
|
|
|
- name: build
|
|
run: |
|
|
make -C c2t
|
|
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk ./build.sh
|
|
|
|
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
name: publish
|
|
run: |
|
|
git branch -D gh-pages || true
|
|
python3 import.py | git fast-import --date-format=now
|
|
git config user.email "jeff@adafruit.com"
|
|
git config user.name "Jeff Epler (Adafruit) via github actions"
|
|
git remote set-url --push origin https://jepler:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
git push -f origin gh-pages
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Web pages
|
|
path: output/
|