Skip to content

Bump GH Actions tool versions #89

Bump GH Actions tool versions

Bump GH Actions tool versions #89

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- master
pull_request:
jobs:
gh-pages:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Cache Nix downloads
# id: nix-store-cache
# uses: actions/cache@v3
# with:
# path: /tmp/nix-cache
# key: nix-store-${{ hashFiles('flake.nix', 'flake.lock', 'shell.nix') }}
# - name: Restore Nix downloads cache
# if: steps.nix-store-cache.outputs.cache-hit == 'true'
# run: |
# sudo rm -rf /nix
# sudo mv /tmp/nix-cache /nix
# sudo chown -R root /nix
- name: Cache Nodejs downloads
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package.json', 'package-lock.json') }}
- name: Cache Typst packages
uses: actions/cache@v3
with:
path: ~/.cache/typst
key: typst-packages-${{ hashFiles('~/.cache/typst/**/typst.toml') }}
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v9
- name: Cache Nix builds
uses: DeterminateSystems/magic-nix-cache-action@v3
- name: Install Nix package dependencies
run: |
nix-channel --update
nix-shell --run true
- name: Install Node module dependencies
run: |
nix-shell --run 'npm ci'
- name: Generate static site pages
run: |
nix-shell --pure --run 'make public'
- name: Inject CNAME
if: ${{ github.repository == 'alerque/polytype' }}
run: |
nix-shell --pure --run 'make public/CNAME'
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
# - name: Copy Nix store to cachable location
# if: steps.nix-store-cache.outputs.cache-hit != 'true'
# run: |
# sudo rm -rf /nix/var/nix/{{gc,daemon}-socket/socket,userpool,gc.lock,db/{big-lock,reserved}} ||:
# cp -r --preserve=timestamps /nix /tmp/nix-cache ||: