add github action for VSCode extension publishing #6
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 Book on GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| name: Deploy Book on GitHub Pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install nix | |
| uses: cachix/install-nix-action@v24 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build website | |
| run: | | |
| nix develop .#book --command bash -c "mdbook build book" | |
| - name: Deploy to GitHub pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: pages # The branch the action should deploy to. | |
| folder: book/book # The folder the action should deploy. | |
| clean: true # Automatically remove deleted files from the deployment branch. |