Skip to content

Adding deploy GH action #1

Adding deploy GH action

Adding deploy GH action #1

Workflow file for this run

name: Deploy to Digital Ocean
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# - name: Checkout Repo
# uses: actions/checkout@v2
# - name: Install Dependencies
# run: npm install
# - name: Build
# run: npm run build
- name: Install SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to Digital Ocean
run: |
ssh -o StrictHostKeyChecking=no [your-username]@[your-droplet-ip] << 'ENDSSH'
cd /var/www/forage-abq
git pull origin main
npm install
npm run build
ENDSSH