Skip to content

Commit

Permalink
Merge branch 'development' into 2815-inherited-properties
Browse files Browse the repository at this point in the history
  • Loading branch information
konzz authored Aug 28, 2020
2 parents 2e71996 + e66f963 commit 25dc1e3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'master'
- name: Use Node.js 14.6.x
uses: actions/setup-node@v1
with:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy release

on:
push:
branches:
- release

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'release'
- name: Use Node.js 14.6.x
uses: actions/setup-node@v1
with:
node-version: '14.6.x'
- name: Cache node modules
uses: actions/cache@v1.1.2
with:
path: ./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: install dependencies
run: yarn install
- name: Cache build
id: cache-build
uses: actions/cache@v2
with:
path: ./prod
key: ${{ runner.os }}-build-${{ hashFiles('app/**/*.*') }}-${{ hashFiles('database/**/*.*') }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/run.js') }}-${{ hashFiles('**/server.js') }}
- name: build production
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn production-build
- name: Tgz production build
run: tar -czf uwazi_release_${GITHUB_SHA}.tgz ./prod
- name: Copy to server
uses: easingthemes/ssh-deploy@v2.1.1
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: uwazi_release_${GITHUB_SHA}.tgz
REMOTE_HOST: ${{ secrets.DEPLOY_SERVER }}
REMOTE_USER: ${{ secrets.DEPLOY_USER }}
TARGET: uwazi_release_${GITHUB_SHA}.tgz
- name: Overwrite latest
uses: easingthemes/ssh-deploy@v2.1.1
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: uwazi_release_${GITHUB_SHA}.tgz
REMOTE_HOST: ${{ secrets.DEPLOY_SERVER }}
REMOTE_USER: ${{ secrets.DEPLOY_USER }}
TARGET: uwazi_release_latest.tgz

0 comments on commit 25dc1e3

Please sign in to comment.