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

Technical/issue 96 greenwood migration #110

Merged
merged 7 commits into from
Aug 18, 2019
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
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
name: Install Project Dependencies
command: yarn install --frozen-lockfile

- run:
name: Run vacuum cleaner
command: yarn clean

- run:
name: Run Linter
command: yarn lint
Expand Down
4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
},
"sourceType": "module"
},
"extends": [
"plugin:react/recommended"
],
"env": {
"browser": true,
"node": true
},
"plugins": ["react"],
"rules": {
"comma-dangle": [2,"never"],
"no-cond-assign": 2,
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

*.jpg binary
*.png binary
*.gif binary
*.gif binary
*.ico binary
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
.cache/
public/
node_modules/
reports/
reports/
bak/
.greenwood/
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# www.thegreenhouse.io
Personal blog / website at [https://www.thegreenhouse.io](https://www.thegreenhouse.io)
[![CircleCI](https://circleci.com/gh/thegreenhouseio/www.thegreenhouse.io/tree/master.svg?style=svg)](https://circleci.com/gh/thegreenhouseio/www.thegreenhouse.io/tree/master)
[![Netlify Status](https://api.netlify.com/api/v1/badges/2c9b7dc5-c01a-43eb-86a4-094f7720e2fd/deploy-status)](https://app.netlify.com/sites/silly-snyder-ece0b2/deploys)
[![GitHub release](https://img.shields.io/github/tag/ProjectEvergreen/greenwood.svg)](https://github.com/ProjectEvergreen/greenwood/tags)
[![GitHub issues](https://img.shields.io/github/issues-raw/ProjectEvergreen/greenwood.svg)](https://github.com/ProjectEvergreen/greenwood/issues)
[![GitHub issues](https://img.shields.io/github/issues-pr-raw/ProjectEvergreen/greenwood.svg)](https://github.com/ProjectEvergreen/greenwood/issues)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/ProjectEvergreen/greenwood/master/LICENSE.md)


## Overview
This is a static site for The Greenhouse's website built with [Gatsby](https://www.gatsbyjs.org/). Has the usual stuff, e.g. Blog posts, about me, contact form, etc. 🌟 💯
This is a static site for [The Greenhouse's website](https://www.thegreenhouse.io) built with [Greenwood](https://www.greenwoodjs.io/). Has the usual stuff, e.g. Blog posts, about me, contact form, etc. 🌟 💯

## Development
Stuff to do / run. 🏃‍♂️
Expand All @@ -12,25 +18,14 @@ After cloning the repo, do the following to get up and running
1. Install [NodeJS](https://nodejs.org/en/) (LTS)
1. Install [Yarn](https://yarnpkg.com/en/) (>= 1.x)
1. Run `yarn install`
1. Add `127.0.0.1 local.thegreenhouse.io` to your `/etc/hosts` file (optional)

### Tasks
- `yarn develop` - start local development server with file watching, live reload, etc
- `yarn build` - build the site for production deployment
- `yarn serve` - builds the site for production and starts a server locally (useful for a local demo)
- `yarn release --release_env=[stage|prod]` - deploys a build to S3, to either stage or prod
- `yarn test --[watch|coverage]` - run tests, opttionally in watch mode and / or to generate code coverage
- `yarn develop` - Start a local development server with file watching, live reload, etc
- `yarn build` - Build the site for production deployment
- `yarn serve` - Build the site for production and start a server locally (useful for a local demo)

## Release Management
The project is hosted in [AWS](https://aws.amazon.com/) and is setup to deploy continously on every merge to master in GitHub by running _running.js_.
1. Jenkins build and deploys to an S3 bucket
1. CloudFront fronts this S3 bucket
1. Route53 has a `CNAME` entry mapping _www.thegreenhouse.io_ to the CloudFront distrubution

To release manually run `yarn build && yarn release --release_env=[stage|prod]`

**Note:** the release expects the following access credentials to be available, either as environment variables or in a file, e.g _~/.aws/credentials.json_.
- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`

The project is hosted by [Netlify](https://www.netlify.com/) and is setup to deploy continously on every merge to master in GitHub.

**Note: see _release.js_ for additional variables needed.**
CircleCI is used for continuous integration on PRs and Netlify will deploy preview builds for all PRs.
36 changes: 0 additions & 36 deletions gatsby-config.js

This file was deleted.

26 changes: 26 additions & 0 deletions greenwood.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const DESCRIPTION = 'Personal site and blog for Owen Buckley and The Greenhouse I/O. Ideas are built here.';
const FAVICON_HREF = '/assets/favicon.ico';
const TITLE = 'The Greenhouse I/O';

module.exports = {
title: TITLE,

meta: [
{ name: 'description', content: DESCRIPTION },
{ name: 'twitter:creator', content: '@thegreenhouseio' },
{ name: 'twitter:site', content: '@thegreenhouseio' },
{ property: 'og:title', content: TITLE },
{ property: 'og:type', content: 'website' },
{ property: 'og:url', content: 'https://www.greenwoodjs.io' },
{ property: 'og:image', content: 'https://s3.amazonaws.com/www.thegreenhouse.io/static/banner.4b3f4ebd.jpg' },
{ property: 'og:description', content: DESCRIPTION },
{ rel: 'shortcut icon', href: FAVICON_HREF },
{ rel: 'icon', href: FAVICON_HREF }
],

devServer: {
port: 1981,
host: 'local.thegreenhouse.io'
}

};
38 changes: 0 additions & 38 deletions jest.config.json

This file was deleted.

44 changes: 10 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,20 @@
"name": "www.thegreenhouse.io",
"version": "1.8.0",
"description": "Personal / portfolio website for The Greenhouse.",
"main": "src/pages/index.jsx",
"repository": "[email protected]:thegreenhouseio/www.thegreenhouse.io.git",
"repository": "https://github.com/thegreenhouseio/www.thegreenhouse.io",
"author": "[email protected]",
"license": "MIT",
"scripts": {
"clean": "rimraf ./reports && rimraf ./public",
"develop": "gatsby develop",
"build": "yarn lint && yarn clean && gatsby build",
"lint": "eslint *.js src/**/**/*.js* test/**/**/*.jsx",
"serve": "yarn build && gatsby serve",
"test": "yarn clean && jest --config ./jest.config.json",
"release": "node release.js"
},
"dependencies": {
"gatsby-plugin-google-analytics": "^1.0.28",
"prop-types": "^15.6.1",
"react-helmet": "^5.2.0",
"react-social-icons": "^3.0.0",
"typography": "^0.16.6"
"develop": "greenwood develop",
"build": "yarn clean && greenwood build",
"lint": "eslint \"*.js\" \"src/**/**/*.js\"",
"serve": "yarn build && ws -d ./public",
"start": "yarn develop",
"test": "echo OOPS!!!!!"
},
"devDependencies": {
"aws-sdk": "^2.211.0",
"babel-preset-react": "^6.24.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-15": "^1.0.5",
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.7.0",
"gatsby": "^1.9.236",
"gatsby-cli": "^1.1.46",
"gatsby-link": "^1.6.39",
"gatsby-plugin-favicon": "^2.1.1",
"gatsby-plugin-react-helmet": "^2.0.11",
"gatsby-plugin-sitemap": "^1.2.23",
"gatsby-plugin-typography": "^1.7.18",
"glob": "^7.1.2",
"jest": "^22.4.3",
"react-test-renderer": "^16.2.0",
"rimraf": "^2.6.2",
"yargs": "^11.0.0"
"@greenwood/cli": "^0.3.5",
"eslint": "^6.1.0"
}
}
}
Loading