Skip to content

Commit

Permalink
chore: use pm2 commands directly instead of yarns to avoid no package…
Browse files Browse the repository at this point in the history
… error after cd
  • Loading branch information
sparky-raccoon committed Jan 14, 2024
1 parent 0c02456 commit b6f87f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Build epitome (/dist)
run: yarn run build
- name: Stop previous epitome pm2 process
run: yarn run stop-and-delete
run: pm2 delete epitome 2> /dev/null || true
- name: Prepare application directory
run: rm -rf ~/apps/epitome && mkdir ~/apps/epitome
- name: Move build contents to application directory
run: mv dist/* ~/apps/epitome
- name: Start new epitome pm2 process
run: cd ~/apps/epitome && yarn run start-and-register
run: cd ~/apps/epitome && pm2 start -f index.js --name epitome && pm2 save
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"test": "export NODE_ENV=development && ts-node src/test.ts",
"dev": "export NODE_ENV=development && tsx watch src/index.ts",
"build": "rm -rf dist && tsc -p tsconfig.prod.json && tsc-alias",
"start-and-register": "pm2 start -f dist/index.js --name epitome && pm2 save",
"stop-and-delete": "pm2 delete epitome 2> /dev/null || true",
"deploy-commands": "tsx src/deploy-commands.ts",
"deploy-commands-dev": "export NODE_ENV=development && tsx src/deploy-commands.ts",
"prepare": "husky install"
Expand Down

0 comments on commit b6f87f2

Please sign in to comment.