Update mkdocs.yml #197
This file contains hidden or 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: Deploy MkDocs to GitHub Pages | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Autorise le workflow à écrire sur le dépôt | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install MkDocs and dependencies | |
| run: | | |
| pip install mkdocs mkdocs-material mkdocs-blog-plugin mkdocs-rss-plugin | |
| - name: Configure Git credentials | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Build and deploy | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/QualCoder-Org/qualcoder-org.github.io.git" | |
| mkdocs gh-deploy --force |