absolute imports #4
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: [rag-sphere] # same as your GitLab rule | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| # Optional: cache MkDocs' .cache/ (similar to your GitLab cache) | |
| - name: Cache MkDocs | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: ${{ runner.os }}-mkdocs-${{ github.ref }}-${{ hashFiles('mkdocs.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mkdocs- | |
| - name: Install dependencies | |
| run: pip install mkdocs-material mkdocs-jupyter | |
| - name: Build site | |
| run: mkdocs build --site-dir public | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |