Skip to content

Change email address #25

Change email address

Change email address #25

name: Deploy Angular App to Droplet
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16.14.2
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install App Dependencies
run: npm install
- name: Build Angular App
run: npm run build
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to Droplet
run: |
ssh -o StrictHostKeyChecking=no ${{secrets.DROPLET_USERNAME}}@${{secrets.DROPLET_IP}} 'rm -rf /var/www/aquametrics.ch/*'
scp -o StrictHostKeyChecking=no -r dist/* ${{secrets.DROPLET_USERNAME}}@${{secrets.DROPLET_IP}}:/var/www/aquametrics.ch/