github workshop #217
Workflow file for this run
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 site to GitHub Pages | |
| # on: | |
| # push: | |
| # branches: | |
| # - main | |
| # jobs: | |
| # deploy: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # # Checkout the repo | |
| # - name: Checkout repo | |
| # uses: actions/checkout@v3 | |
| # # Set up Python environment | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v4 | |
| # with: | |
| # python-version: '3.x' | |
| # # Install MkDocs and Material theme | |
| # - name: Install MkDocs & Material theme | |
| # run: | | |
| # pip install mkdocs-material mkdocs-jupyter | |
| # # Build the MkDocs site | |
| # - name: Build the site | |
| # run: | | |
| # cd workshop | |
| # mkdocs build | |
| # touch site/.nojekyll # Disable Jekyll | |
| # # Deploy to GitHub Pages | |
| # - name: Deploy to GitHub Pages | |
| # uses: peaceiris/actions-gh-pages@v3 | |
| # with: | |
| # github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # publish_dir: workshop/site | |
| name: Deploy MkDocs site to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - workshop-page | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install MkDocs and dependencies | |
| run: | | |
| pip install mkdocs-material mkdocs-jupyter | |
| - name: Build MkDocs site | |
| working-directory: docs/workshop | |
| run: | | |
| mkdocs build | |
| touch site/.nojekyll # Disable Jekyll processing | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/workshop/site | |
| # optionally set the branch to deploy to: | |
| # publish_branch: gh-pages |