forked from SongDerrick/O2ARC_V2
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (29 loc) · 885 Bytes
/
dist.yml
File metadata and controls
36 lines (29 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy to Amazon ECS
on:
push:
branches: [ "main" ]
env:
AWS_REGION: ap-northeast-2 # set this to your preferred AWS region, e.g. us-west-1
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Restart PM2 process
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.LIGHTSAIL_HOST }}
username: bitnami
key: ${{ secrets.LIGHTSAIL_SSH_KEY }}
script: |
cd /home/bitnami/O2ARC_V2/backend
git pull origin main
npm ci
pm2 reload app