Skip to content

Commit

Permalink
Update GitHub Actions workflow to execute build on every pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu committed Sep 3, 2024
1 parent 826605f commit 47d3ad5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 47d3ad5

Please sign in to comment.