diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d02d918..339e6ce 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,17 +23,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: lfs: true - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 with: node-version: '20' cache: 'npm' - name: Restore cache - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: | .next/cache @@ -49,7 +49,7 @@ jobs: run: npm run build - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: ./out @@ -63,4 +63,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index a217961..e70cfa4 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -18,14 +18,18 @@ jobs: LYCHEE_REPORT_FILE: ./lychee/out.md runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v1.8.0 + uses: lycheeverse/lychee-action@v2.9.0 + with: + # v2 fails the job on broken links by default; keep the old behaviour + # so the tracking issue below gets updated instead. + fail: false - name: Read Lychee report - if: env.lychee_exit_code != 0 + if: steps.lychee.outputs.exit_code != 0 id: readReport run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) @@ -34,29 +38,26 @@ jobs: echo "$EOF" >> $GITHUB_OUTPUT - run: echo "${{ steps.readReport.outputs.FILE_CONTENT }}" - name: Update link tracking issue (update invalid links) - if: env.lychee_exit_code != 0 - uses: actions-cool/issues-helper@v3 - with: - actions: 'update-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ env.LINK_TRACKING_ISSUE_NUMBER }} - state: 'open' - body: ${{ steps.readReport.outputs.FILE_CONTENT }} - update-mode: 'replace' + if: steps.lychee.outputs.exit_code != 0 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_BODY: ${{ steps.readReport.outputs.FILE_CONTENT }} + run: | + gh api --method PATCH "repos/${{ github.repository }}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ + -f state=open \ + -f body="${ISSUE_BODY}" - name: Update link tracking issue (no invalid links) - if: env.lychee_exit_code == 0 - uses: actions-cool/issues-helper@v3 - with: - actions: 'update-issue' - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ env.LINK_TRACKING_ISSUE_NUMBER }} - state: 'closed' - body: 'No invalid links found! 🤖' - update-mode: 'replace' + if: steps.lychee.outputs.exit_code == 0 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api --method PATCH "repos/${{ github.repository }}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ + -f state=closed \ + -f body='No invalid links found! 🤖' - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: lychee-report path: ${{ env.LYCHEE_REPORT_FILE }}