File tree Expand file tree Collapse file tree 5 files changed +53
-46
lines changed Expand file tree Collapse file tree 5 files changed +53
-46
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,22 @@ name: Deploy
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [master]
66
77jobs :
8- build :
8+ deploy :
99 runs-on : ubuntu-latest
1010
1111 steps :
12- - uses : actions/checkout@v2
13-
14-
15- - name : Run a command remotely
16- run : |
17- mkdir -p ~/.ssh/
18- echo "$SSH_PRIVATE_KEY" > ../private.key
19- sudo chmod 600 ../private.key
20- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
21- ssh -i ../private.key typeofweb@s18.mydevil.net 'source ~/.bashrc && ssh-add ~/.ssh/github && bash -s' < ./ssh-script-deploy.sh
22- shell : bash
23- env :
24- SSH_PRIVATE_KEY : ${{secrets.SSH_PRIVATE_KEY}}
25- SSH_KNOWN_HOSTS : ${{secrets.SSH_KNOWN_HOSTS}}
12+ - uses : actions/checkout@v2
13+
14+ - name : Setup SSH Keys and known_hosts
15+ env :
16+ SSH_AUTH_SOCK : /tmp/ssh_agent.sock
17+ run : |
18+ mkdir -p ~/.ssh
19+ ssh-keyscan -H github.com >> ~/.ssh/known_hosts
20+ ssh-keyscan -H s18.mydevil.net >> ~/.ssh/known_hosts
21+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
22+ ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
23+ ssh typeofweb@s18.mydevil.net 'source ~/.bashrc && ssh-add ~/.ssh/github && bash -s' < ./ssh-script-deploy.sh
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Run tests
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v1
14+
15+ - name : Read .nvmrc
16+ run : echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
17+ id : nvm
18+ - name : Use Node.js
19+ uses : actions/setup-node@v1
20+ with :
21+ node-version : ' ${{ steps.nvm.outputs.NVMRC }}'
22+
23+ - name : Cache Node.js modules
24+ uses : actions/cache@v1
25+ with :
26+ path : ~/.npm
27+ key : ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
28+ restore-keys : |
29+ ${{ runner.OS }}-node-
30+ ${{ runner.OS }}-
31+
32+ - name : npm install, and test
33+ run : |
34+ npm ci
35+ npm run test:ci
36+ env :
37+ CI : true
Original file line number Diff line number Diff line change 6464 },
6565 "husky" : {
6666 "hooks" : {
67- "pre-commit" : " npm run tslint && pretty-quick --staged"
67+ "pre-commit" : " pretty-quick --staged"
6868 }
6969 }
7070}
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ echo `git rev-parse HEAD` > .version
2828# npm prune
2929
3030echo " 👉 Restarting the server…"
31- devil www restart bot.typeofweb.com
32- curl -I bot.typeofweb.com
31+ pm2 restart bot
3332
3433echo " 👉 Done! 😱 👍"
You can’t perform that action at this time.
0 commit comments