From 72e6de8bc6cd0599f2b89fe937ab6aa88bb8458a Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> Date: Sun, 13 Oct 2024 19:27:15 +0200 Subject: Update actions --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91cb81d..b6b173f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,29 +1,50 @@ -name: ci +name: Deploy to GH Pages + on: push: branches: - master - main + permissions: - contents: write + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - 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/setup-python@v5 + - uses: actions/setup-python@v5.2.0 with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v4 + python-version: 3.12 + - uses: actions/cache@v4.1.1 with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: | - mkdocs-material- - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force + ${{ runner.os }}-pip- + - name: Install python dependencies + run: pip install -r requirements.txt + - name: Build the site + run: mkdocs build + - name: Upload static to GH Pages + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: site/ + + deploy: + environment: + name: github-pages + url: ${{ steps.upload-artifact.outputs.url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to github pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file -- cgit v1.3