From 231cc8545ad9915499317aeface3ce5e4f0ae5b9 Mon Sep 17 00:00:00 2001 From: "thomas.ekstrand" Date: Thu, 29 Feb 2024 17:51:43 -0600 Subject: [PATCH 1/2] use filename as var --- .github/workflows/pdf.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml index f147dd1f..7cbfac3f 100644 --- a/.github/workflows/pdf.yml +++ b/.github/workflows/pdf.yml @@ -27,10 +27,11 @@ jobs: yes "" | sudo ./install.sh - name: Build PDF - run: npx docusaurus-prince-pdf -u https://meshtastic.org/docs/about/ --dest ./pdf --output ./pdf/${{ steps.filename.outputs.filename }} + run: npx docusaurus-prince-pdf -u https://meshtastic.org/docs/about/ --dest ./ --output ./${{ steps.filename.outputs.filename }} - name: Create request artifacts if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }} + # if: github.event.pull_request.merged uses: gavv/pull-request-artifacts@v2.1.0 with: commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} @@ -38,4 +39,4 @@ jobs: artifacts-token: ${{ secrets.ARTIFACTS_TOKEN }} artifacts-repo: meshtastic/artifacts artifacts-branch: docs - artifacts: ./pdf/${{ steps.version.outputs.version }} + artifacts: ./${{ steps.filename.outputs.filename }} From 041c56d813085176f7f16dae43101dcb19881f2f Mon Sep 17 00:00:00 2001 From: "thomas.ekstrand" Date: Thu, 29 Feb 2024 18:19:41 -0600 Subject: [PATCH 2/2] run on merge only --- .github/workflows/pdf.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml index 7cbfac3f..6d4cd166 100644 --- a/.github/workflows/pdf.yml +++ b/.github/workflows/pdf.yml @@ -30,8 +30,7 @@ jobs: run: npx docusaurus-prince-pdf -u https://meshtastic.org/docs/about/ --dest ./ --output ./${{ steps.filename.outputs.filename }} - name: Create request artifacts - if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }} - # if: github.event.pull_request.merged + if: github.event.pull_request.merged uses: gavv/pull-request-artifacts@v2.1.0 with: commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }}