From 4bad34680b317e7e39efe8460da2d2db08ec0d46 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Tue, 14 Jan 2025 17:39:46 +0000 Subject: [PATCH] [Forgejo] Swap to using docker image --- .forgejo/workflows/publish.yaml | 25 ++++++++++--------------- Taskfile.yml | 2 +- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 4b13ee26..119e12a6 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -14,6 +14,11 @@ on: jobs: build: runs-on: docker + container: + image: git.byjp.me/jp/hugo-tasks:latest + volumes: + - /pages/www.byjp.me/:/pages/www.byjp.me/ + - /gemini/www.byjp.me/:/gemini/www.byjp.me/ steps: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 @@ -26,20 +31,10 @@ jobs: with: path: /tmp/hugo key: www.byjp.me-hugo-persistent-info - - name: Build site - uses: https://git.byjp.me/jp/hugo-tasks@v0.1 - - name: Publish website + - name: Build + publish web site + gemini capsule run: | - rm -r /pages/www.byjp.me/* /pages/www.byjp.me/.* - cp -r ./public/. /pages/www.byjp.me - - - name: Build Gemini capsule - uses: https://git.byjp.me/jp/hugo-tasks@v0.1 - with: - tasks: gemini-reduce - - - name: Publish Gemini capsule - run: | - rm -r /gemini/www.byjp.me/* /gemini/www.byjp.me/.* - cp -r ./public/. /gemini/www.byjp.me + task build + rsync -a --delete ./public/. /pages/www.byjp.me + task gemini-reduce + rsync -a --delete ./public/. /gemini/www.byjp.me diff --git a/Taskfile.yml b/Taskfile.yml index af08c734..0485a7e1 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -36,7 +36,7 @@ tasks: cache: /tmp/hugo/cache cmds: - hugo --cacheDir {{ .cache }} --gc --minify --baseURL "https://{{ .domain }}" - - pagefind + - pagefind --silent import: desc: Pulls information from various other sites/silos into this repo. Expects `./tools/.env` to be populated.