Skip to content

Commit

Permalink
Set up CI to publish website
Browse files Browse the repository at this point in the history
  • Loading branch information
david-yz-liu committed Apr 16, 2024
1 parent 4035bdd commit 62dd0ac
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,35 @@ jobs:
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

build:
runs-on: ubuntu-latest
environment:
name: publish-docs
url: https://www.cs.toronto.edu/~david/memory-viz
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Set up node and cache packages
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install npm packages
run: npm ci
- name: Build docs and demo website
run: |
npm run build --workspace=demo
npm run build --workspace=docs
mkdir docs/build/demo
cp -r demo/dist/* docs/build/demo
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "docs/build/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
EXCLUDE: "/dist/, /node_modules/"

0 comments on commit 62dd0ac

Please sign in to comment.