From 39a81fe5cf50b23c7cf7f40e11cd2af25e45d23c Mon Sep 17 00:00:00 2001 From: Scott Scoble Date: Wed, 29 Apr 2026 00:41:13 -0700 Subject: [PATCH] Use unique WORKDIR per run via github.run_id --- .forgejo/workflows/deploy.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 7cd95b7..d66802a 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -13,25 +13,26 @@ jobs: steps: - name: Clone repo run: | - rm -rf /tmp/brand-site - git clone http://localhost:3000/sscoble/brand-site.git /tmp/brand-site - cd /tmp/brand-site + export WORKDIR=/tmp/brand-site-${{ github.run_id }} + git clone http://localhost:3000/sscoble/brand-site.git "$WORKDIR" + cd "$WORKDIR" git checkout ${{ github.sha }} + echo "WORKDIR=$WORKDIR" >> $GITHUB_ENV - name: Build website with Nix - working-directory: /tmp/brand-site run: nix build .#website --no-write-lock-file + working-directory: ${{ env.WORKDIR }} - name: Build speaker profile PDF - working-directory: /tmp/brand-site run: nix build .#speaker-profile --no-write-lock-file + working-directory: ${{ env.WORKDIR }} - name: Copy build artifacts run: | mkdir -p ./dist - cp -r /tmp/brand-site/result/* ./dist/ + cp -r ${{ env.WORKDIR }}/result/* ./dist/ mkdir -p ./public/downloads - cp /tmp/brand-site/result-2/* ./public/downloads/ 2>/dev/null || true + cp ${{ env.WORKDIR }}/result-2/* ./public/downloads/ 2>/dev/null || true - name: Configure rclone run: |