-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (31 loc) · 773 Bytes
/
cd.yml
File metadata and controls
34 lines (31 loc) · 773 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
name: cd
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- './.github/**'
- './data/**'
- README.md
- LICENSE
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency: production
environment:
name: Production
if: ${{ !github.event.repository.fork }}
steps:
- name: Deploy Arithmetica Bot
uses: appleboy/ssh-action@334f9259f2f8eb3376d33fa4c684fff373f2c2a6
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ secrets.REPO_PATH }}
git pull
node scripts/pull-and-restart.js ${{ secrets.PM2_HOME }}