|  | 
|  | 1 | +name: Create release with _freeze | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | +  workflow_dispatch: | 
|  | 5 | + | 
|  | 6 | +permissions: | 
|  | 7 | +  contents: write | 
|  | 8 | + | 
|  | 9 | +jobs: | 
|  | 10 | +  build: | 
|  | 11 | +    runs-on: ubuntu-latest | 
|  | 12 | +    steps: | 
|  | 13 | +      - name: Checkout | 
|  | 14 | +        uses: actions/checkout@v4 | 
|  | 15 | + | 
|  | 16 | +      - name: Setup Julia | 
|  | 17 | +        uses: julia-actions/setup-julia@v2 | 
|  | 18 | +        with: | 
|  | 19 | +          version: '1.10' | 
|  | 20 | + | 
|  | 21 | +      - name: Load Julia packages from cache | 
|  | 22 | +        uses: julia-actions/cache@v2 | 
|  | 23 | + | 
|  | 24 | +      - name: Set up Quarto | 
|  | 25 | +        uses: quarto-dev/quarto-actions/setup@v2 | 
|  | 26 | +        with: | 
|  | 27 | +          # Needs Quarto 1.6 (which is currently a pre-release version) to fix #533 | 
|  | 28 | +          version: pre-release | 
|  | 29 | + | 
|  | 30 | +      - name: Restore cached _freeze folder | 
|  | 31 | +        id: cache-restore | 
|  | 32 | +        uses: actions/cache/restore@v4 | 
|  | 33 | +        with: | 
|  | 34 | +          path: | | 
|  | 35 | +            ./_freeze/ | 
|  | 36 | +          key: | | 
|  | 37 | +            ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }} | 
|  | 38 | +          restore-keys: | | 
|  | 39 | +            ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }} | 
|  | 40 | +
 | 
|  | 41 | +      - name: Render | 
|  | 42 | +        run: quarto render | 
|  | 43 | + | 
|  | 44 | +      - name: Compress _freeze folder | 
|  | 45 | +        run: tar -czf _freeze.tar.gz _freeze | 
|  | 46 | + | 
|  | 47 | +      - name: Generate tag name for release | 
|  | 48 | +        id: tag | 
|  | 49 | +        run: echo "tag_name=freeze_$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | 
|  | 50 | + | 
|  | 51 | +      - name: Create GitHub release | 
|  | 52 | +        uses: softprops/action-gh-release@v2 | 
|  | 53 | +        with: | 
|  | 54 | +          tag_name: ${{ steps.tag.outputs.tag_name }} | 
|  | 55 | +          files: | | 
|  | 56 | +            _freeze.tar.gz | 
|  | 57 | +            Manifest.toml | 
|  | 58 | +          body: | | 
|  | 59 | +            This release contains the `_freeze` folder generated by Quarto when | 
|  | 60 | +            rendering the docs. You can use this to speed up the rendering | 
|  | 61 | +            process on your local machine by downloading and extracting the | 
|  | 62 | +            `_freeze` folder, then placing it at the root of the project. | 
|  | 63 | +
 | 
|  | 64 | +            Note that the contents of the `_freeze` folder only hash the | 
|  | 65 | +            contents of the .qmd files, and do not include information about | 
|  | 66 | +            the Julia environment. Thus, each `_freeze` folder is only valid | 
|  | 67 | +            for a given Julia environment, which is specified in the | 
|  | 68 | +            Manifest.toml file included in this release. To ensure | 
|  | 69 | +            reproducibility, you should make sure to use the Manifest.toml file | 
|  | 70 | +            locally as well. | 
|  | 71 | +
 | 
|  | 72 | +            These releases are not automatically generated. To make an updated | 
|  | 73 | +            release with the contents of the `_freeze` folder from the main | 
|  | 74 | +            branch, you can run the `Create release with _freeze` workflow from | 
|  | 75 | +            https://github.com/TuringLang/docs/actions/workflows/create_release.yml. | 
0 commit comments