| name: Deploy MkDocs site | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: pip install mkdocs mkdocs-material | |
| - name: Build site | |
| run: mkdocs build | |
| - name: Copy HTML files from bot to site root | |
| run: cp bot/*.* site/ | |
| - name: Create landing folder in site | |
| run: mkdir -p site/landing | |
| - name: Copy landing folder including subdirs | |
| run: cp -r docs/landing/* site/landing/ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.PAT_TOKEN }} | |
| publish_dir: ./site | |
| force_orphan: true | |