Rename CODEOWNERS to .github/CODEOWNERS #36
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
name: documentation | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
sparse-checkout: | | |
docs | |
mkdocs.yml | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Setup Python runtime | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
cache: pip | |
cache-dependency-path: | | |
requirements.txt | |
- name: Setup build cache | |
uses: actions/cache/restore@v3 | |
with: | |
key: mkdocs-material-${{ hashfiles('.cache/**') }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Install dependencies | |
run: sudo apt-get install pngquant | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Build with MkDocs | |
run: | | |
mkdocs build --clean | |
mkdocs --version | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |