Merge pull request #25 from InfoMusCP/feature/fix_action #7
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: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. Checkout repo (code + docs) | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # 2. Set up Python | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| # 3. Install docs dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev] # installs mkdocs and all extras | |
| # 4. Build doc | |
| - name: Build MkDocs site | |
| env: | |
| PYTHONPATH: ${{ github.workspace }}/PyEyesWeb | |
| run: mkdocs build --verbose | |
| # 5. Push to gh-pages | |
| - name: Deploy to GitHub Pages 🚀 | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GH_PAGES_TOKEN }} | |
| publish_dir: ./site | |
| publish_branch: gh-pages | |
| force_orphan: true |