mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
Added production deployment automation
This commit is contained in:
parent
76354b9d74
commit
c0ad686168
26
.github/workflows/assembly-production-deployment-automation.yml
vendored
Normal file
26
.github/workflows/assembly-production-deployment-automation.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: production-deployment-automation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Deploy to Server
|
||||||
|
uses: appleboy/ssh-action@master
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.REMOTE_HOST }}
|
||||||
|
username: ${{ secrets.REMOTE_USER }}
|
||||||
|
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||||
|
port: 22
|
||||||
|
script: |
|
||||||
|
cd ${{ secrets.REMOTE_TARGET }} && \
|
||||||
|
git reset --hard && git clean -df && \
|
||||||
|
git pull && \
|
||||||
|
npm i && \
|
||||||
|
npm run build --if-present && \
|
||||||
|
pm2 restart assembly --update-env
|
Loading…
Reference in New Issue
Block a user