From cc3d735500ca24168381ae1fe1afcd11f2331ec0 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:23:28 -0600 Subject: [PATCH] split workflow into multiple jobs --- .github/workflows/deploy-to-neocities.yml | 37 ++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index a125563..a42b5b0 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -16,7 +16,8 @@ defaults: shell: bash jobs: - deploy: + build: + name: Build Hugo site runs-on: ubuntu-latest env: HUGO_VERSION: "0.121.1" @@ -44,10 +45,44 @@ jobs: - name: Insert 404 page run: | cp public/not_found/index.html public/not_found.html + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: public + path: public + retention-days: 1 + + highlight: + name: Highlight code with Torchlight + runs-on: ubuntu-latest + needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: public - name: Highlight with Torchlight run: | npm i @torchlight-api/torchlight-cli npx torchlight + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: public + path: public + retention-days: 1 + + deploy: + name: Publish to Neocities + runs-on: ubuntu-latest + needs: highlight + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: public - name: Deploy to neocities uses: bcomnes/deploy-to-neocities@v1 with: