Skip to content

Commit

Permalink
Merge in master
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmith committed Aug 24, 2020
2 parents 149443c + 1fc717c commit acf5170
Show file tree
Hide file tree
Showing 18 changed files with 3,466 additions and 2,371 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build_backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: "web-prov-backend"
heroku_email: "[email protected]"
# TODO Use this actions once this issue is fixed thehttps://github.com/nwtgck/actions-netlify/issues/102
build_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build-frontend
- name: Publish
uses: netlify/actions/cli@master
with:
args: deploy --dir=_site --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Netlify Preview Deploy'

on:
pull_request:
types: ['opened', 'edited', 'synchronize']

jobs:
build_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build-frontend
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: '_site'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The first step to setting up your environment involves installing `Node.js` and

### Neo4j
Next, if not already installed, `Neo4j` should be installed:
1. Install [Neo4j](https://neo4j.com/docs/operations-manual/current/installation/)
1. Go to the [Neo4j browser](http://localhost:7474/browser/), input the default username (`neo4j`) and password (`neo4j`) and change the password to whatever you plan to use for development (ex. `password`).
1. Install [Neo4j Desktop](https://neo4j.com/docs/operations-manual/current/installation/) (tested with Neo4j version 4.1.1).
1. Start the server using the `neo4j start` command.
1. Go to the [Neo4j browser](http://localhost:7474/browser/), input the default username (`neo4j`) and password (`neo4j`) and change the password to whatever you plan to use for development (ex. `password`).
> [`Docker` can also](https://neo4j.com/developer/docker-run-neo4j/) be used to create a `Neo4j` database. If using `Docker`, the above instructions can be ignored.
Also, create a `.env` in `packages/backend` file if you don't already have one:
Expand Down Expand Up @@ -50,7 +50,29 @@ npx lerna add the-module-to-install --scope=the-package-to-add-the-module-to [--
See the branching instruction and rules [here](https://guides.github.com/introduction/flow/). Basically, when working on a feature or bug, create a branch off master. When you want to merge your changes, just create a PR.

## Deployment
The frontend and backend are automatically deployed when PRs or new commits are merged/pushed to the `master` branch. The following sections describe how this deployment process was set up.
The frontend and backend are automatically deployed when `tags` are pushed to the repo. The following sections describe how to push a new `tag` how this deployment process was set up.

## Steps
### 1. Set the new version
Use the [npm-version](https://docs.npmjs.com/cli/version) command to bump the version in your `package.json`, make a commit with the new version number and a new tag (again with the same version number). Make sure to use the appropriate version type:
```
npm version patch
# or this command
npm version minor
# or this command
npm version major
```

### 2. Push your commits and tags
Then, push the commits and tags:
```
git push
git push --tags
```

That's it!

### Backend
The backend is currently using `Heroku` for automatic deployments. The following commands were used to set up the Heroku backend:
Expand Down
2 changes: 0 additions & 2 deletions netlify.toml

This file was deleted.

Loading

0 comments on commit acf5170

Please sign in to comment.