From 2e7893551cd65ee1daae1477d998b695946e25db Mon Sep 17 00:00:00 2001 From: Daniel da Silva Date: Wed, 10 Jul 2024 11:58:53 +0100 Subject: [PATCH] Add logging --- .github/workflows/deploy-gh.yml | 35 +++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-gh.yml b/.github/workflows/deploy-gh.yml index a14e7582..0ce5991e 100644 --- a/.github/workflows/deploy-gh.yml +++ b/.github/workflows/deploy-gh.yml @@ -72,21 +72,21 @@ jobs: id: cache-node-modules with: path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + key: ${{ runner.os }}-modules-${{ hashFiles('**/package.json') }} - - name: Cache runs - uses: actions/cache@v4 - id: cache-runs + - name: Restore transformed runs + uses: actions/cache/restore@v4 + id: cache-runs-restore with: path: public/data/activities/transformed - key: ${{ runner.os }}-build-${{ env.cache-name }} + key: ${{ runner.os }}-runs - name: Cache auth uses: actions/cache@v4 id: cache-auth with: path: credentials.json - key: ${{ runner.os }}-build-${{ env.cache-name }} + key: ${{ runner.os }}-auth - name: Install run: npm install @@ -94,6 +94,13 @@ jobs: - name: Fetch runs run: node scripts/index + - name: Save transformed runs + uses: actions/cache/save@v4 + id: cache-runs-save + with: + path: public/data/activities/transformed + key: ${{ runner.os }}-runs + - name: Build runs list run: node scripts/list @@ -109,6 +116,22 @@ jobs: path: build retention-days: 1 + - name: Store runs data + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: runs-data + path: public/data + retention-days: 1 + + - name: Store activity list + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: activity-list + path: src/data/activity_list.json + retention-days: 1 + deploy: runs-on: ubuntu-latest needs: build