From 137e95c15e515c295d56aa234aea4cd73ab58822 Mon Sep 17 00:00:00 2001 From: SparkFun Automated Action <36016723+santaimpersonator@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:21:13 -0700 Subject: [PATCH] Create generate_documentation.yml Workflow to build and deploy the documentation using mkdocs-material theme --- .github/workflows/generate_documentation.yml | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/generate_documentation.yml diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml new file mode 100644 index 0000000..0507b86 --- /dev/null +++ b/.github/workflows/generate_documentation.yml @@ -0,0 +1,37 @@ +name: Build & Deploy Documentation +on: + push: + branches: + - main + +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Instal pgnquant for optimize plugin + run: sudo apt-get install pngquant + + - name: Set up Python runtime + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install Python dependencies + run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-authors-plugin mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]' + + - name: Set up build cache + uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache + + - name: Install Insiders build + env: + MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }} + run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git + - run: mkdocs gh-deploy --force