From 3acb53c7eb5df97c979066610ead21f4f13fc145 Mon Sep 17 00:00:00 2001 From: Francesco Bartoli Date: Thu, 22 Feb 2024 23:24:45 +0100 Subject: [PATCH] Use mkdocs command to publish --- .github/requirements-docs.txt | 2 +- .github/workflows/docs.yml | 25 +++++++++---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/requirements-docs.txt b/.github/requirements-docs.txt index fbbd2be..d07ddf9 100644 --- a/.github/requirements-docs.txt +++ b/.github/requirements-docs.txt @@ -1,2 +1,2 @@ mkdocs-material -termynal \ No newline at end of file +termynal diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c8e8fa6..8b3260a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,23 +26,16 @@ jobs: deploy-docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.1 - - name: Configure Git Credentials - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: 3.* + - uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache - name: Install dependencies run: pip install mkdocs mkdocs-material termynal - - name: Build MkDocs site - run: mkdocs build - - name: Deploy to GitHub Pages - uses: mhausenblas/mkdocs-deploy-gh-pages@master - env: - GITHUB_TOKEN: ${{ secrets.FASTGEOAPI_GITHUB_TOKEN }} - CONFIG_FILE: ./mkdocs.yml - EXTRA_PACKAGES: build-base - REQUIREMENTS: .github/requirements-docs.txt + - name: Deploy and publish to GitHub Pages + run: mkdocs gh-deploy --force