From 1170952f7658c35782925aad0f8edbac2261b7ca Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:09:54 +0200 Subject: [PATCH 1/6] previews for PRs --- .github/workflows/ExportNotebooks.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ExportNotebooks.yml b/.github/workflows/ExportNotebooks.yml index 79d0e5c0..1bba545e 100644 --- a/.github/workflows/ExportNotebooks.yml +++ b/.github/workflows/ExportNotebooks.yml @@ -1,5 +1,6 @@ name: Export Pluto notebooks & Deploy on: + pull_request: push: branches: - main @@ -40,8 +41,16 @@ jobs: include("generate.jl") ' working-directory: generate - - name: Build and Deploy + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: website + path: ./website/__site + + - name: Deploy to gh-pages uses: JamesIves/github-pages-deploy-action@releases/v3 + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages From b549f8cb6658c2f611a3b524e733911102c54e21 Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:13:53 +0200 Subject: [PATCH 2/6] Create CommentPR.yml --- .github/workflows/CommentPR.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/CommentPR.yml diff --git a/.github/workflows/CommentPR.yml b/.github/workflows/CommentPR.yml new file mode 100644 index 00000000..07cac63a --- /dev/null +++ b/.github/workflows/CommentPR.yml @@ -0,0 +1,22 @@ +name: Add artifact links to pull request and related issues + on: + workflow_run: + workflows: ["ExportNotebooks"] + types: [completed] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + jobs: + artifacts-url-comments: + name: add artifact links to pull request and related issues job + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: tonyhallett/artifacts-url-comments@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prefix: Here are the build results + suffix: Artifacts will only be retained for 90 days. + format: name + addTo: pull From 2cebfa18ef0b86eddccececef66625fab66c1d6f Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:18:20 +0200 Subject: [PATCH 3/6] Update CommentPR.yml --- .github/workflows/CommentPR.yml | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CommentPR.yml b/.github/workflows/CommentPR.yml index 07cac63a..f5e8f184 100644 --- a/.github/workflows/CommentPR.yml +++ b/.github/workflows/CommentPR.yml @@ -1,22 +1,22 @@ name: Add artifact links to pull request and related issues - on: - workflow_run: - workflows: ["ExportNotebooks"] - types: [completed] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: +on: + workflow_run: + workflows: ["ExportNotebooks"] + types: [completed] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: - jobs: - artifacts-url-comments: - name: add artifact links to pull request and related issues job - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: tonyhallett/artifacts-url-comments@v1.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - prefix: Here are the build results - suffix: Artifacts will only be retained for 90 days. - format: name - addTo: pull +jobs: + artifacts-url-comments: + name: add artifact links to pull request and related issues job + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: tonyhallett/artifacts-url-comments@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prefix: Here are the build results + suffix: Artifacts will only be retained for 90 days. + format: name + addTo: pull From 522c576b42d535be1d94da50c9eb9b1ee88db3f8 Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:24:19 +0200 Subject: [PATCH 4/6] Update CommentPR.yml --- .github/workflows/CommentPR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CommentPR.yml b/.github/workflows/CommentPR.yml index f5e8f184..4de5f149 100644 --- a/.github/workflows/CommentPR.yml +++ b/.github/workflows/CommentPR.yml @@ -1,7 +1,7 @@ name: Add artifact links to pull request and related issues on: workflow_run: - workflows: ["ExportNotebooks"] + workflows: [ExportNotebooks] types: [completed] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From f6b6a509a493c40aa83c6150fcfcc7096ef10df2 Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:27:31 +0200 Subject: [PATCH 5/6] Update ExportNotebooks.yml --- .github/workflows/ExportNotebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ExportNotebooks.yml b/.github/workflows/ExportNotebooks.yml index 1bba545e..67e96bec 100644 --- a/.github/workflows/ExportNotebooks.yml +++ b/.github/workflows/ExportNotebooks.yml @@ -1,4 +1,4 @@ -name: Export Pluto notebooks & Deploy +name: Export & Deploy Notebooks on: pull_request: push: From 7ad9d50585e0e28077a37485bf2062e7cb41f66c Mon Sep 17 00:00:00 2001 From: Fabian Greimel Date: Fri, 29 Jul 2022 14:28:18 +0200 Subject: [PATCH 6/6] Update CommentPR.yml --- .github/workflows/CommentPR.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CommentPR.yml b/.github/workflows/CommentPR.yml index 4de5f149..e21319b5 100644 --- a/.github/workflows/CommentPR.yml +++ b/.github/workflows/CommentPR.yml @@ -1,7 +1,7 @@ -name: Add artifact links to pull request and related issues +name: Comment Artifacts on: workflow_run: - workflows: [ExportNotebooks] + workflows: [Export & Deploy Notebooks] types: [completed] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: