Skip to content

Merge pull request #29 from VitorM3/feat/docs #6

Merge pull request #29 from VitorM3/feat/docs

Merge pull request #29 from VitorM3/feat/docs #6

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main # Deploy when changes are pushed to the main branch
paths:
- 'docs/**' # Deploy when changes are made to the docs directory
- 'mkdocs.yml' # Deploy when changes are made to the MkDocs configuration file
- 'pyproject.toml' # Deploy when changes are made to the Poetry configuration file
- '.python-version' # Deploy when changes are made to the Python version file
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Python version from .python-version
id: python_version
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV

Check failure on line 24 in .github/workflows/deploy-mkdocs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-mkdocs.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
- name: Set up Python
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Build MkDocs site
run: poetry run mkdocs build
- name: Archive built site
uses: actions/upload-artifact@v4
with:
name: mkdocs-site
path: site
deploy:
needs: build # Ensure the 'build' job completes successfully before deploying
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download built site
uses: actions/download-artifact@v4
with:
name: mkdocs-site
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./site