Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added legend, fixed label cut-off issue, and changed default threshold, colour function, font sizes, ... #12

Merged
merged 17 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/nodejs.yml

This file was deleted.

88 changes: 88 additions & 0 deletions .github/workflows/stage.nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: "Build, Stage, and Deploy"

env:
project: globecorr
stage: stage.brinkmanlab.ca
production: ${{ github.event_name == 'push' || github.event.pull_request.merged }}

on:
pull_request:
types: [ready_for_review, synchronize, closed, reopened]
branches:
- master
- test
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install, build
run: |
npm run ci
npm run build --if-present
env:
CI: true

# Stage
- name: Ensure full path exists on stage
if: env.production == 'false'
uses: garygrossgarten/github-action-ssh@release
with:
command: mkdir -p /srv/${{ env.project }}/${{ github.head_ref }}-${{ github.event.pull_request.id }}/
host: ${{ env.stage }}
username: ${{ secrets.STAGE_USER }}
privateKey: ${{ secrets.STAGE_KEY }}

- name: Deploy to stage
if: env.production == 'false'
uses: AEnterprise/[email protected]
env:
DEPLOY_KEY: ${{ secrets.STAGE_KEY }}
ARGS: "-e -c -r --delete"
SERVER_PORT: 22
FOLDER: "./dist/*"
SERVER_IP: ${{ env.stage }}
USERNAME: ${{ secrets.STAGE_USER }}
SERVER_DESTINATION: /srv/${{ env.project }}/${{ github.head_ref }}-${{ github.event.pull_request.id }}/

- name: Report ready for review
if: env.production == 'false'
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: Pull request has been successfully built and is ready for review at [https://${{ github.head_ref }}-${{ github.event.pull_request.id }}-${{ env.project }}.${{ env.stage }}/](https://${{ github.head_ref }}-${{ github.event.pull_request.id }}-${{ env.project }}.${{ env.stage }}/)

# Deploy
- name: GitHub Pages Deploy
if: env.production == 'true'
uses: maxheld83/[email protected]
env:
BUILD_DIR: dist
GH_PAT: ${{ secrets.GH_PAT }}

cleanup:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Delete build from staging server
uses: garygrossgarten/github-action-ssh@release
with:
command: rm -rf /srv/${{ env.project }}/${{ github.head_ref }}-${{ github.event.pull_request.id }}/
host: ${{ env.stage }}
username: ${{ secrets.STAGE_USER }}
privateKey: ${{ secrets.STAGE_KEY }}
Loading