use centralised action #90
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
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # manual trigger for testing | |
| name: Deploy to GitHub Pages | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - run: quarto --version | |
| - name: Render Quarto site | |
| run: quarto render | |
| - name: Rename original search index | |
| run: mv _site/search.json _site/search_original.json | |
| - name: Install jq | |
| run: sudo apt-get install jq | |
| - name: Generate augmented search index | |
| uses: TuringLang/actions/Search@main | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: _site | |
| clean: false # we need this to preserve the old versions of Turing docs, e.g. library/ |