From 47d3ad5b0e39791c7dbe02055af676803f8217dd Mon Sep 17 00:00:00 2001 From: David Liu Date: Mon, 2 Sep 2024 19:58:51 -0400 Subject: [PATCH] Update GitHub Actions workflow to execute build on every pull request --- .github/workflows/ci.yml | 25 ++++++++++++++++++++----- CHANGELOG.md | 4 +++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfccc0c8..603d2508 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,7 @@ jobs: build: runs-on: ubuntu-latest - environment: - name: publish-docs - url: https://www.cs.toronto.edu/~david/memory-viz - if: github.ref == 'refs/heads/master' + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v3 - name: Set up node and cache packages @@ -51,12 +48,30 @@ jobs: npm run build --workspace=docs mkdir docs/build/demo cp -r demo/dist/* docs/build/demo + - name: Archive documentation website artifact + uses: actions/upload-artifact@v4 + with: + name: docs + path: docs/build + publish: + runs-on: ubuntu-latest + needs: build + environment: + name: publish-docs + url: https://www.cs.toronto.edu/~david/memory-viz + if: github.ref == 'refs/heads/master' + steps: + - name: Download documentation website artifact + uses: actions/download-artifct@v4 + with: + name: docs + path: docs - name: Deploy to Server uses: easingthemes/ssh-deploy@main with: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} ARGS: "-rlgoDzvc -i --delete" - SOURCE: "docs/build/" + SOURCE: "docs" REMOTE_HOST: ${{ secrets.REMOTE_HOST }} REMOTE_USER: ${{ secrets.REMOTE_USER }} TARGET: ${{ secrets.REMOTE_TARGET }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 775e2e5b..9a9b28ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,9 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### 🔧 Internal changes -## [0.3.0] - 2024-08-02 +- Update GitHub Actions workflow to execute build on every pull request (and deployment only on changes to `master`) + +## [0.3.1] - 2024-08-02 ### 🐛 Bug fixes