Skip to content

Update build.yml

Update build.yml #2

Workflow file for this run

name: Deploy (SSH)
on:
push:
branches: [ main ]
# allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build.yml
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
env:
PROJECT_PATH: ${{ secrets.PROJECT_PATH }}
# PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
host: ${{ secrets.IP }}
username: ${{ secrets.USERNAME }}
# password: ${{ secrets.PASSWORD }}
key: ${{ secrets.KEY }}
# passphrase: ${{ secrets.PASSPHRASE }}
port: ${{ secrets.PORT }}
envs: PROJECT_PATH
script: |
cd $PROJECT_PATH
git pull
npm i
npm run build