v1.191.0-rc1 #375
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy staging | |
on: | |
push: | |
branches: | |
- staging | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
create_pre_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'staging' | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Cache node modules | |
uses: actions/[email protected] | |
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 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.DEPLOY_KEY }} | |
- name: Pre release | |
run: ./scripts/pre-release.sh ${{ secrets.DEPLOY_SERVER }} ${{ secrets.DEPLOY_USER }} ${{ secrets.GH_TOKEN }} | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: uwazi-api | |
with: | |
environment: staging | |
projects: ${{ secrets.SENTRY_PROJECTS }} | |
version: ${{ steps.package-version.outputs.current-version}} | |
ignore_empty: true |