Merge pull request #13 from nfdi4health/fix/mkdocs #7
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: Build MkDocs Site | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install pipx | |
run: python3 -m pip install --user pipx | |
- name: Install Poetry | |
run: | | |
export PATH=$HOME/.local/bin:$PATH | |
pipx install poetry | |
pipx ensurepath | |
shell: bash | |
- name: Install dependencies | |
run: | | |
echo "Installing dependencies with poetry" | |
poetry install | |
shell: bash | |
- name: Build site | |
run: | | |
echo "Building site with mkdocs" | |
poetry run mkdocs build | |
shell: bash | |
- name: Upload site to artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./site | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
contents: read | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action | |