Bump actions/checkout from 3 to 4 #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: "📚 Documentation" | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "docs/**" | |
- "*.md" | |
- ".github/workflows/documentation.yml" | |
tags: | |
- "*" | |
pull_request: | |
branches: [main] | |
paths: | |
- ".github/workflows/documentation.yml" | |
- requirements/documentation.txt | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
deploy: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Get source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
cache-dependency-path: "requirements/documentation.txt" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade -r requirements.txt | |
python -m pip install --upgrade -r requirements/documentation.txt | |
- name: Build static website | |
run: mkdocs build --verbose | |
- name: Save build doc as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: site/ | |
if-no-files-found: error | |
retention-days: 30 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | |
with: | |
# Upload entire repository | |
path: site/ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') | |
uses: actions/deploy-pages@v2 |