From b3010fa9fc9ecbb8894da0f40cd13fc1ea7aad93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=B0=20=D0=91=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F=D0=BA=D0=BE=D0=B2?= Date: Fri, 22 Nov 2024 01:38:35 +0400 Subject: [PATCH] update build-deploy-mk-docs.yml --- .github/workflows/build-deploy-mk-docs.yml | 40 ++++++++++------------ 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-deploy-mk-docs.yml b/.github/workflows/build-deploy-mk-docs.yml index ed56b8a..521564c 100644 --- a/.github/workflows/build-deploy-mk-docs.yml +++ b/.github/workflows/build-deploy-mk-docs.yml @@ -3,30 +3,26 @@ on: push: branches: - master +permissions: + contents: write jobs: - build: + deploy: runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install dependencies + - uses: actions/checkout@v4 + - name: Configure Git Credentials run: | - python -m pip install --upgrade pip - pip install mkdocs mkdocs-material - - - name: Build MkDocs site - run: mkdocs build --config-file mk-docs/mkdocs.yml - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./mk-docs/site - target_branch: gh-pages \ No newline at end of file + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --force \ No newline at end of file