Merge pull request #117 from 42wekey/main #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: deploy | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: | |
- deploy | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
SSH: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run scripts in server | |
uses: appleboy/ssh-action@master | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
script: | | |
cd git/42ence-front | |
git reset --hard | |
git fetch | |
git pull | |
npm i | |
pm2 restart npm |