Skip to content

Merge branch 'dev' into production #29

Merge branch 'dev' into production

Merge branch 'dev' into production #29

name: production-deploy
on:
push:
branches: ["production"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: 'echo "$configuration" > configuration.ts'
shell: bash
env:
configuration: ${{secrets.PRODUCTION_SERVER_CONFIG}}
- name: Copy server configuration file to remote
uses: garygrossgarten/github-action-scp@release
with:
local: configuration.ts
remote: cbnu_alrami_production/packages/server/src/config/configuration.ts
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
- run: 'echo "$configuration" > configuration.ts'
shell: bash
env:
configuration: ${{secrets.PRODUCTION_SCRAPER_CONFIG}}
- name: Copy scraper configuration file to remote
uses: garygrossgarten/github-action-scp@release
with:
local: configuration.ts
remote: cbnu_alrami_production/packages/scraper/src/config/configuration.ts
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
- name: run deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_SERVER_SSH_HOST }}
username: ${{ secrets.DEV_SERVER_SSH_USER }}
password: ${{ secrets.DEV_SERVER_SSH_PASSWORD }}
port: ${{ secrets.DEV_SERVER_SSH_PORT }}
script: |
export PATH="/usr/local/bin:$PATH"
cd cbnu_alrami_production
git pull
sh ./deploy_production.sh