mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 13:43:25 +00:00
69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
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: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
#- uses: actions/cache@v3
|
|
# with:
|
|
# path: |
|
|
# ~/.cache/pip
|
|
# ~/.platformio/.cache
|
|
# key: ${{ runner.os }}-pio-cyd-klipper
|
|
|
|
- uses: actions/setup-python@v5
|
|
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@v4
|
|
with:
|
|
name: firmware
|
|
path: ./out
|
|
|
|
- name: Upload GitHub Page Artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
|
|
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'
|
|
steps:
|
|
- name: Print GitHub event name
|
|
run: |
|
|
echo "${{ github.event_name }}"
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|
|
|