Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Backend Node CI/CD

on:
push:
branches: [main]
branches: [main, with-subfolder]
pull_request:
branches: [main]
branches: [main, with-subfolder]

defaults:
run:
working-directory: backend

jobs:
build:
Expand All @@ -25,11 +29,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "backend/package-lock.json"
- run: npm ci
- run: npm run build --if-present
# - run: npm test
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "csc307-frontend"
heroku_app_name: "csc307-backend-api-bklingen"
heroku_email: "[email protected]"
appdir: "backend"
41 changes: 41 additions & 0 deletions .github/workflows/frontend React.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Frontend React CI/CD

on:
push:
branches: [main, with-subfolder]
pull_request:
branches: [main, with-subfolder]

defaults:
run:
working-directory: frontend

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "frontend/package-lock.json"
- run: npm ci
- run: npm run build --if-present
# - run: npm test
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "csc307-frontend-bklingen"
heroku_email: "[email protected]"
appdir: "frontend"
24 changes: 1 addition & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
This is an example on how to deploy an app in a subfolder using Heroku.
[![Frontend React CI/CD](https://github.com/bklingen-calpoly/csc307-react-with-ci-cd/actions/workflows/frontend%20React.yml/badge.svg?branch=with-subfolder)](https://github.com/bklingen-calpoly/csc307-react-with-ci-cd/actions/workflows/frontend%20React.yml)

This is an example on how to deploy an app in a subfolder using Heroku.
20 changes: 20 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files": {
"main.css": "/csc307-react-with-ci-cd/static/css/main.40f025c2.chunk.css",
"main.js": "/csc307-react-with-ci-cd/static/js/main.3caef6cf.chunk.js",
"main.js.map": "/csc307-react-with-ci-cd/static/js/main.3caef6cf.chunk.js.map",
"runtime-main.js": "/csc307-react-with-ci-cd/static/js/runtime-main.8fe93fa7.js",
"runtime-main.js.map": "/csc307-react-with-ci-cd/static/js/runtime-main.8fe93fa7.js.map",
"static/js/2.0d0cbcd7.chunk.js": "/csc307-react-with-ci-cd/static/js/2.0d0cbcd7.chunk.js",
"static/js/2.0d0cbcd7.chunk.js.map": "/csc307-react-with-ci-cd/static/js/2.0d0cbcd7.chunk.js.map",
"index.html": "/csc307-react-with-ci-cd/index.html",
"static/css/main.40f025c2.chunk.css.map": "/csc307-react-with-ci-cd/static/css/main.40f025c2.chunk.css.map",
"static/js/2.0d0cbcd7.chunk.js.LICENSE.txt": "/csc307-react-with-ci-cd/static/js/2.0d0cbcd7.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.8fe93fa7.js",
"static/js/2.0d0cbcd7.chunk.js",
"static/css/main.40f025c2.chunk.css",
"static/js/main.3caef6cf.chunk.js"
]
}
File renamed without changes.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/csc307-react-with-ci-cd/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/csc307-react-with-ci-cd/logo192.png"/><link rel="manifest" href="/csc307-react-with-ci-cd/manifest.json"/><title>React App</title><link href="/csc307-react-with-ci-cd/static/css/main.40f025c2.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,u,i=t[0],a=t[1],l=t[2],p=0,s=[];p<i.length;p++)u=i[p],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&s.push(o[u][0]),o[u]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(t);s.length;)s.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,i=1;i<r.length;i++){var a=r[i];0!==o[a]&&(n=!1)}n&&(c.splice(t--,1),e=u(u.s=r[0]))}return e}var n={},o={1:0},c=[];function u(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.m=e,u.c=n,u.d=function(e,t,r){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(r,n,function(t){return e[t]}.bind(null,n));return r},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/csc307-react-with-ci-cd/";var i=this["webpackJsonpreact-with-ci-cd"]=this["webpackJsonpreact-with-ci-cd"]||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var f=a;r()}([])</script><script src="/csc307-react-with-ci-cd/static/js/2.0d0cbcd7.chunk.js"></script><script src="/csc307-react-with-ci-cd/static/js/main.3caef6cf.chunk.js"></script></body></html>
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions build/static/css/main.40f025c2.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/static/css/main.40f025c2.chunk.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions build/static/js/2.0d0cbcd7.chunk.js

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions build/static/js/2.0d0cbcd7.chunk.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions build/static/js/2.0d0cbcd7.chunk.js.map

Large diffs are not rendered by default.

Loading