Update #44
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 | |
env: | |
SSH_SECRET: ${{ secrets.SSH_SECRET }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_ADDR: ${{ secrets.SSH_ADDR }} | |
SSH_PORT: ${{ secrets.SSH_PORT }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: SSH Deploy | |
run: | | |
echo "${SSH_SECRET}" > ./secret_key | |
ssh-keyscan -p ${SSH_PORT} -H ${SSH_ADDR} > known_hosts | |
chmod 600 secret_key | |
ssh ${SSH_USER}@${SSH_ADDR} -p ${SSH_PORT} -o UserKnownHostsFile=./known_hosts -i ./secret_key \ | |
"cd ~/repos/frontend && \ | |
git checkout . && \ | |
git pull && \ | |
. ~/.nvm/nvm.sh && \ | |
nvm exec 14.17.6 npm install --production && \ | |
nvm exec 14.17.6 npm run generate" |