collapse workflow to single job

This commit is contained in:
John Bowdre 2024-01-21 15:29:49 -06:00
parent 298f44fad1
commit c3a8722369

View file

@ -16,8 +16,8 @@ defaults:
shell: bash shell: bash
jobs: jobs:
build: deploy:
name: Build Hugo site name: Build and deploy Hugo site
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Hugo setup - name: Hugo setup
@ -34,48 +34,10 @@ jobs:
- name: Insert 404 page - name: Insert 404 page
run: | run: |
cp public/not_found/index.html public/not_found.html cp public/not_found/index.html public/not_found.html
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: public
retention-days: 1
highlight:
name: Highlight code with Torchlight
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: build
path: public
- name: Highlight with Torchlight - name: Highlight with Torchlight
run: | run: |
npm i @torchlight-api/torchlight-cli npm i @torchlight-api/torchlight-cli
npx torchlight npx torchlight
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: highlight
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: highlight
path: public
- name: Deploy to neocities - name: Deploy to neocities
uses: bcomnes/deploy-to-neocities@v1 uses: bcomnes/deploy-to-neocities@v1
with: with: