mirror of
https://github.com/okalachev/flix.git
synced 2026-08-15 16:29:00 +00:00
Add qspi and opi psram binaries. Build binary for Flix2 board. Add config.h file for defining parameter defaults. Set appropriate pwm frequency for c3/s3 automatically using config.h. Remove pid parameters definitions, the may be set is config.h now.
85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches: [ '*' ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
markdownlint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install markdownlint
|
|
run: npm install -g markdownlint-cli2
|
|
- name: Run markdownlint
|
|
run: markdownlint-cli2 "**/*.md"
|
|
|
|
build_book:
|
|
runs-on: ubuntu-latest
|
|
needs: markdownlint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install mdBook
|
|
run: cargo install mdbook --vers 0.4.43 --locked
|
|
- name: Build book
|
|
run: cd docs && mdbook build
|
|
- name: Wait for Build to complete
|
|
uses: lewagon/wait-on-check-action@v1.9.1
|
|
with:
|
|
ref: ${{ github.sha }}
|
|
check-name: build_linux
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
wait-interval: 30
|
|
- name: Find firmware binaries
|
|
id: build_run
|
|
run: |
|
|
RUN_ID=$(gh api "repos/${{ github.repository }}/actions/workflows/build.yml/runs?head_sha=${{ github.sha }}&per_page=1" --jq '.workflow_runs[0].id')
|
|
echo "id=$RUN_ID" >> $GITHUB_OUTPUT
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Download firmware binaries
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
repository: ${{ github.repository }}
|
|
run-id: ${{ steps.build_run.outputs.id }}
|
|
name: firmware-binary
|
|
path: docs/build
|
|
- name: Create shortcuts for firmware binaries
|
|
working-directory: docs/build
|
|
run: |
|
|
for FQBN in esp32.esp32.*; do
|
|
zip -r $FQBN.zip $FQBN
|
|
BOARD="${FQBN#esp32.esp32.}"
|
|
ln -s "$FQBN/flix.ino.merged.bin" "flix.$BOARD.merged.bin"
|
|
ln -s "$FQBN/flix.ino.bin" "flix.$BOARD.bin"
|
|
ln -s "$FQBN/flix.ino.bootloader.bin" "flix.$BOARD.bootloader.bin"
|
|
done
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: docs/build
|
|
|
|
deploy:
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build_book
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|