-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.13 KB
/
deploy_master.yaml
File metadata and controls
34 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Deploy to production server.
on:
push:
branches:
- 'master'
jobs:
deploy:
name: Deploy to PRODUCTION server
runs-on: ubuntu-latest
environment: production
# https://github.com/marketplace/actions/ssh-execute-commands
steps:
- name: Login remotely, pull and deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.MASTER_HOSTNAME }}
username: ${{ secrets.MASTER_USERNAME }}
key: ${{ secrets.MASTER_SECRET_KEY_SSH }}
port: 22
command_timeout: 200m
script: |
set -e
export VITE_APP_API_GRAPHQL_URL=https://${{ secrets.MASTER_HOSTNAME }}/graphql/
export VITE_APP_API_GRAPHQL_WEBSOCKET_URL=wss://${{ secrets.MASTER_HOSTNAME }}/graphql/
export VITE_APP_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
export VITE_APP_SENTRY_ENV=production
export NODE_OPTIONS="--max-old-space-size=8192"
cd /home/${{ secrets.MASTER_USERNAME }}/OneSilaFrontend
git config pull.rebase false
git pull
npm install
npm run build