# SPDX-FileCopyrightText: 2023 - 2024 Thomas Buck # SPDX-License-Identifier: CERN-OHL-S-2.0+ # # ------------------------------------------------------------------------------ # | Copyright (c) 2023 - 2024 Thomas Buck | # | | # | This source describes Open Hardware and is licensed under the CERN-OHL-S v2 | # | or any later version. | # | | # | You may redistribute and modify this source and make products using it under | # | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt) | # | or any later version. | # | | # | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, | # | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A | # | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version) | # | for applicable conditions. | # | | # | Source location: https://github.com/drinkrobotics/dispensy | # | | # | As per CERN-OHL-S v2 section 4, should You produce hardware based on this | # | source, You must where practicable maintain the Source Location visible | # | on the external case of the Gizmo or other products you make using this | # | source. | # ------------------------------------------------------------------------------ name: Docs # only build single instance of docs for latest main branch on: push: branches: - master jobs: deploy: runs-on: ubuntu-latest permissions: contents: write pages: write id-token: write steps: - name: Checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 - name: Checkout repo submodules run: git submodule update --init - name: Install dependencies run: | sudo add-apt-repository --yes ppa:kicad/kicad-7.0-releases sudo apt update sudo apt install -y --install-recommends kicad pipx libfuse2 libegl1 - name: Install latest mdbook run: | tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" mkdir mdbook curl -sSL $url | tar -xz --directory=./mdbook echo `pwd`/mdbook >> $GITHUB_PATH - name: Install (more current) PrusaSlicer run: | url="https://github.com/prusa3d/PrusaSlicer/releases/download/version_2.7.1/PrusaSlicer-2.7.1+linux-x64-GTK3-202312121425.AppImage" mkdir prusa curl -o prusa/prusa-slicer -sSL $url chmod a+x prusa/prusa-slicer echo `pwd`/prusa >> $GITHUB_PATH - name: Install JLC2KiCad_lib run: pipx install git+https://github.com/Xyntexx/JLC2KiCad_lib.git@footprint_alignment_workarounds - name: Fetch part footprints run: hardware/fetch_jlc.sh - name: Generate Plots run: hardware/generate_plot.sh - name: Build Book run: docs/generate_docs.sh build - name: Setup Pages uses: actions/configure-pages@v2 - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: path: 'docs/book' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1