From 4bfcfc195a9fc0db3d3ae04b115bb0ac9de0010c Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Mon, 6 Nov 2023 22:46:33 -0500 Subject: [PATCH] bump --- .github/workflows/mkdocs.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 78714d5..18dcad3 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -15,29 +15,32 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - with: - fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10' + - name: Calculate requirements hash + id: req-hash + run: echo "::set-output name=hash::$(sha256sum requirements-doc.txt | awk '{print $1}')" + + - name: Setup cache + uses: actions/cache@v3 + with: + key: mkdocs-material-${{ steps.req-hash.outputs.hash }} + path: .cache + restore-keys: | + mkdocs-material- + - name: Install Requirements run: | sudo apt-get update && sudo apt-get install pngquant && pip install -r requirements-doc.txt + env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - - - name: Fetch documentation branch - run: git fetch origin gh-pages --depth=1 - - - name: Configure Git User - run: | - git config user.name "actions" - git config user.email "actions@github.com" + GH_TOKEN: ${{ secrets.GH_TOKEN }} - name: Get current tag run: echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV @@ -45,4 +48,4 @@ jobs: - name: Build and deploy with mike run: mike deploy --update-aliases ${{ env.version }} latest --ignore-remote-status env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file