2022-09-22 17:06:53 +00:00
|
|
|
name: Deploy to Development
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "development" ]
|
|
|
|
|
|
|
|
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: npm install
|
2022-09-22 19:08:16 +00:00
|
|
|
- run: npm run build:dev
|
2022-11-01 14:50:07 +00:00
|
|
|
- run: mkdir ~/.ssh
|
|
|
|
- run: echo "$SSH_KEY" >> ~/.ssh/id_rsa_ifsalas
|
|
|
|
- run: chmod 400 ~/.ssh/id_rsa_ifsalas
|
2022-11-01 14:54:00 +00:00
|
|
|
- run: echo -e "Host ifsalas\n\tUser ifsalas\n\tHostname 45.76.5.44\n\tIdentityFile ~/.ssh/id_rsa_ifsalas\n\tStrictHostKeyChecking No" >> ~/.ssh/config
|
2022-11-01 14:50:07 +00:00
|
|
|
- run: rsync -avz --progress build/ ifsalas:/home/ifsalas/web/dev --delete
|