Skip to content

Update Mooncake

Update Mooncake #371

Workflow file for this run

name: PR Preview Workflow
on:
pull_request:
types:
- opened
- synchronize
concurrency:
group: docs
permissions:
contents: write
pull-requests: write
jobs:
build-and-preview:
if: github.event.action == 'opened' || github.event.action == 'synchronize'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.11'
- name: Load Julia packages from cache
uses: julia-actions/cache@v2
# Note: needs resolve() to fix #518
- name: Instantiate Julia environment
run: julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.resolve()'
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# Needs Quarto 1.6 to fix #533, which is currently a pre-release version
version: pre-release
- name: Restore cached _freeze folder
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
./_freeze/
key: |
${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}
- name: Render Quarto site
run: quarto render
- name: Save _freeze folder
id: cache-save
uses: actions/cache/save@v4
with:
path: |
./_freeze/
key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }}
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: _site
target-folder: pr-previews/${{ github.event.pull_request.number }}
clean: false
commit-message: Deploy preview for PR ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment preview URL
uses: thollander/actions-comment-pull-request@v2
with:
message: |
<!-- preview-url-comment -->
Preview the changes: https://turinglang.org/docs/pr-previews/${{ github.event.pull_request.number }}
Please avoid using the search feature and navigation bar in PR previews!
comment_tag: preview-url-comment