Skip to content

Merge branch 'master' of https://github.com/salimi-my/profolio #15

Merge branch 'master' of https://github.com/salimi-my/profolio

Merge branch 'master' of https://github.com/salimi-my/profolio #15

Workflow file for this run

name: Deploy
# Trigger the workflow on push and
# pull request events on the master branch
on:
push:
branches: ['master']
pull_request:
branches: ['master']
# Authenticate to the the server via ssh
# and run our deployment script
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/checkout@v3
- name: Deploy to Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
script: |
cd /var/www/www.salimi.my
git pull origin main
git status
export PATH=/home/${{ secrets.SSH_USERNAME }}/.nvm/versions/node/20.9.0/bin:/usr/bin:/bin;
pnpm install
rm -rf .next
pnpm build
pm2 restart www.salimi.my