From bd7727b41f75c5dac25e673469444f8151ea34cf Mon Sep 17 00:00:00 2001 From: bvanroll Date: Fri, 25 Apr 2025 21:46:45 +0200 Subject: [PATCH] first test action --- .github/workflows/neocities.yml | 40 ++++++++++++++++++++++++++++----- compile.sh | 10 +++++++-- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/neocities.yml b/.github/workflows/neocities.yml index ab7215a..2692fbd 100644 --- a/.github/workflows/neocities.yml +++ b/.github/workflows/neocities.yml @@ -19,13 +19,43 @@ concurrency: jobs: - deploy: - runs-on: ubuntu-latest - + prep_array: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.matrix.outputs.value }} steps: - - uses: actions/checkout@v4 - - name: test + - name: generate posts.html + run: | + echo "" >> public/posts.html + - uses: actions/checkout@v4 - name: Deploy to neocities uses: bcomnes/deploy-to-neocities@v1 diff --git a/compile.sh b/compile.sh index b0828f1..dce2677 100755 --- a/compile.sh +++ b/compile.sh @@ -1,7 +1,13 @@ +#!/bin/bash +t='[' for entry in notes/* do echo $entry - test=`git log --follow --format=%ad --date=format:'%Y-%m-%d' -- $entry` - echo $test + filename=$(basename "$entry" .md) + #filename="${entry%}" + timestamp=`git log --follow --format=%ad --date=format:'%Y-%m-%d' -- $entry` + t+="{\"source\"=\"$entry\",\"dest\"=\"$filename\",\"time\"=\"$timestamp\"}," done +echo "value=${t%?}]" +echo "value=${t%?}]" >> $GITHUB_OUTPUT