if-salas-web/.github/workflows/deploy-prod.yml

29 lines
697 B
YAML
Raw Normal View History

name: Deploy to Production
on:
push:
branches: [ "main" ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
SSH_KEY: ${{secrets.SSH_KEY}}
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: mkdir ~/.ssh
- run: 'echo "$SSH_KEY" >> ~/.ssh/id_ed25519_ifsalas'
2022-09-22 13:05:05 +00:00
- run: chmod 400 ~/.ssh/id_ed25519_ifsalas
- run: echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_ed25519_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config
2022-09-22 13:48:46 +00:00
- run: npm install
- run: npm run build
- run: npm run deploy:prod