Fix button disable conditions #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PlatformIO CI | |
permissions: | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.platformio/.cache | |
key: ${{ runner.os }}-pio-cyd-klipper | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO Core | |
run: pip install --upgrade platformio esptool | |
- name: Build PlatformIO Project | |
run: | | |
python3 ci.py | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware | |
path: ./out | |
- name: Upload GitHub Page Artifact | |
uses: actions/upload-pages-artifact@v2 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
if: (github.event_name == 'release' && github.event.action == 'created') || (github.event_name != 'pull_request' && github.ref == 'refs/heads/master') | |
steps: | |
- name: Print GitHub event name | |
run: | | |
echo "${{ github.event_name }}" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |