/user: Links to primary and secondary account #310
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 hypersomnia.xyz | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: production | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: unnecessary | |
- name: Adding Known Hosts | |
run: ssh-keyscan -H hypersomnia.xyz >> ~/.ssh/known_hosts | |
- name: Deploy with rsync | |
# WATCH OUT!!! DO NOT ADD SPACES INSIDE BRACES BETWEEN ARGUMENTS OR THE ENTIRE WEBSITE WILL BE WIPED OUT! | |
run: rsync --exclude={'public/arenas','private','node_modules','.git','.github','.env'} -avzP . [email protected]:/var/www/app --delete-after | |
- name: Restart PM2 | |
run: | | |
ssh [email protected] "pm2 restart app" |