diff --git a/.github/workflows/material-for-mkdocs.yml b/.github/workflows/material-for-mkdocs.yml new file mode 100644 index 0000000..7a4c643 --- /dev/null +++ b/.github/workflows/material-for-mkdocs.yml @@ -0,0 +1,44 @@ +name: Deploy Material for MkDocs documentation to GitHub Pages + +env: + AZURE_WEBAPP_NAME: st-undp + PYTHON_VERSION: '3.11' + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +permissions: + contents: write + +jobs: + deploy: + 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 + + - name: Set up Python version + uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: | + poetry config virtualenvs.create false + poetry install --only docs + + - name: Deploy to GitHub Pages + run: mkdocs gh-deploy --force