Skip to content

Merge pull request #2 from Zachdidit/develop #15

Merge pull request #2 from Zachdidit/develop

Merge pull request #2 from Zachdidit/develop #15

Workflow file for this run

name: Deployment
concurrency: production
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploying to AWS
uses: appleboy/ssh-action@master # An action made to control Linux servers
with: # We set all our secrets here for the action, these won't be shown in the action logs
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ${{ secrets.APPDIR }}
git pull # we pull any changes from git
npm prune # we remove any unused dependencies
npm install # we install any missing dependencies
npm run build # we build our app
pm2 restart portfolio-app