Skip to content

Merge pull request #74 from pennant-notebook/landing/footer #31

Merge pull request #74 from pennant-notebook/landing/footer

Merge pull request #74 from pennant-notebook/landing/footer #31

Workflow file for this run

name: Pennant Client CI
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Add DO Droplet to SSH known hosts
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "142.93.60.189 $(ssh-keyscan 142.93.60.189 2>/dev/null)" >> ~/.ssh/known_hosts
- name: Deploy to DigitalOcean
env:
DO_SSH_KEY: ${{ secrets.DIGITALOCEAN_SSH_KEY }}
DO_HOST: ${{ secrets.DIGITALOCEAN_HOST }}
DO_USERNAME: ${{ secrets.DIGITALOCEAN_USERNAME }}
run: |
echo "$DO_SSH_KEY" > private_key.pem
chmod 600 private_key.pem
scp -i private_key.pem -r * [email protected]:~/pennant-notebook/client
ssh -i private_key.pem [email protected] "cd ~/pennant-notebook/server && npm run build:ui && pm2 restart 0"
rm -f private_key.pem