Players can be removed, keeping the game playable (#76) #67
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Deploy to VPS | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: ${{ secrets.DEPLOY_USERNAME }} | |
key: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
script: | | |
cd /home/ubuntu/CaptionThis | |
git pull origin master | |
# Build client | |
cd client | |
npm install | |
npm run build | |
# Run server | |
cd ../server | |
npm install | |
rm -rf .env | |
echo "MY_SERVICE_URL=${{ secrets.PRODUCTION_MY_SERVICE_URL }}" >> .env | |
npx tsc | |
pm2 kill | |
pm2 start dist/main.js --name "Backend" |