feat: cli tool to print out playtimes #21
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
name: Deploy to 2004scape.org world servers | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/deploy-worlds.yml' | |
- 'data/**' | |
- '!public/**' | |
- 'public/js/teavm/classes.js' | |
- 'src/**' | |
- '!*.test.ts' | |
- '!src/lostcity/web/**' | |
- 'src/lostcity/web/routes/cache.js' | |
- '!view/**' | |
- 'view/webclient-inner.ejs' | |
workflow_dispatch: | |
concurrency: | |
group: deploy-worlds | |
cancel-in-progress: true | |
# pm2 start npm --name "w1-maintenance" -- run maintenance | |
# pm2 start npm --name "w2-maintenance" -- run maintenance | |
# pm2 start npm --name "w1-server" --kill-timeout 60000 -- start | |
# pm2 start npm --name "w2-server" --kill-timeout 60000 -- start | |
jobs: | |
deploy-world1: | |
name: Deploy to World 1 (Free) server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Executing commands over SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_WORLD1_HOST }} | |
username: ${{ secrets.SSH_WORLD1_USER }} | |
key: ${{ secrets.SSH_WORLD1_KEY }} | |
port: ${{ secrets.SSH_WORLD1_PORT }} | |
script: | | |
cd w1.225 | |
pm2 stop w1-server | |
git pull | |
npm ci | |
pm2 restart w1-maintenance | |
npm run client:clean | |
npm run client:pack | |
npm run server:clean | |
npm run server:build | |
pm2 stop w1-maintenance | |
pm2 restart w1-server | |
deploy-world2: | |
name: Deploy to World 2 (Members) server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Executing commands over SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_WORLD2_HOST }} | |
username: ${{ secrets.SSH_WORLD2_USER }} | |
key: ${{ secrets.SSH_WORLD2_KEY }} | |
port: ${{ secrets.SSH_WORLD2_PORT }} | |
script: | | |
cd w2.225 | |
pm2 stop w2-server | |
git pull | |
npm ci | |
pm2 start w2-maintenance | |
npm run client:clean | |
npm run client:pack | |
npm run server:clean | |
npm run server:build | |
pm2 stop w2-maintenance | |
pm2 start w2-server |