Merge pull request #435 from xueweic/main #5
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 website | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| - name: Copy pixi manifest | |
| run: | | |
| mkdir /tmp/pixi | |
| cp ${GITHUB_WORKSPACE}/pixi.toml /tmp/pixi | |
| - name: Setup pixi | |
| uses: prefix-dev/setup-pixi@v0.9.4 | |
| with: | |
| manifest-path: /tmp/pixi/pixi.toml | |
| - name: Build pkgdown site | |
| run: pixi run --environment r44 --manifest-path /tmp/pixi/pixi.toml pkgdown_build | |
| - name: Disable Jekyll | |
| run: touch docs/.nojekyll | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./docs | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |