Add books I read on vacation #2
Workflow file for this run
This file contains 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: Build blog | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
# Allow this job to clone the repo and create a page deployment | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
TZ: America/Chicago | |
steps: | |
- name: Checkout your repository using git | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os }}-node-modules | |
path: node_modules | |
- name: Try to pull builder | |
run: docker compose pull astro || true | |
- name: Build and maybe push builder | |
uses: docker/build-push-action@v5 | |
with: | |
cache-to: type=inline | |
push: ${{ github.event_name == 'push' }} | |
tags: ghcr.io/jordemort/jordemort-blog-builder:latest | |
target: astro | |
- name: Build site | |
run: docker compose run --rm astro npm build | |
- name: Build and push dependencies | |
uses: docker/build-push-action@v5 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
push: true | |
tags: ghcr.io/jordemort/jordemort-blog-dependencies:latest | |
target: dependencies | |
- name: Build and push site | |
uses: docker/build-push-action@v5 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
push: true | |
tags: ghcr.io/jordemort/jordemort-blog:latest | |
target: dependencies |