diff --git a/.github/workflows/CommentPR.yml b/.github/workflows/CommentPR.yml new file mode 100644 index 00000000..e21319b5 --- /dev/null +++ b/.github/workflows/CommentPR.yml @@ -0,0 +1,22 @@ +name: Comment Artifacts +on: + workflow_run: + workflows: [Export & Deploy Notebooks] + 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 diff --git a/.github/workflows/ExportNotebooks.yml b/.github/workflows/ExportNotebooks.yml index 79d0e5c0..67e96bec 100644 --- a/.github/workflows/ExportNotebooks.yml +++ b/.github/workflows/ExportNotebooks.yml @@ -1,5 +1,6 @@ -name: Export Pluto notebooks & Deploy +name: Export & Deploy Notebooks 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