This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from usds/stage
Stage
- Loading branch information
Showing
17 changed files
with
373 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Deploy Demo | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
branch_name: | ||
description: branch to deploy | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ inputs.branch_name }} | ||
|
||
- uses: actions/cache@v2 | ||
id: api-npm-cache | ||
with: | ||
path: ./api/node_modules/ | ||
key: ${{ runner.os }}-api-npm-${{ hashFiles('./api/package-lock.json') }} | ||
|
||
- uses: actions/cache@v2 | ||
id: frontend-npm-cache | ||
with: | ||
path: ./frontend/node_modules/ | ||
key: ${{ runner.os }}-frontend-npm-${{ hashFiles('./frontend/package-lock.json') }} | ||
|
||
- uses: actions/cache@v2 | ||
id: frontend-scss-cache | ||
with: | ||
path: ./frontend/src/styles/ | ||
key: ${{ runner.os }}-frontend-scss-${{ hashFiles('./frontend/src/scss/**.scss') }} | ||
|
||
# Notice that the cache for the frontend is actually in the api directory... | ||
- uses: actions/cache@v2 | ||
id: frontend-src-cache | ||
with: | ||
path: ./api/src/client | ||
key: ${{ runner.os }}-frontend-src-${{ hashFiles('./frontend/src/**/*', './frontend/package.json') }} | ||
|
||
# Build frontend | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
|
||
- name: Install frontend dependencies | ||
if: steps.frontend-npm-cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
working-directory: frontend | ||
|
||
- name: Build frontend styles | ||
if: steps.frontend-scss-cache.outputs.cache-hit != 'true' | ||
run: npm run build:styles | ||
working-directory: frontend | ||
|
||
- name: Build frontend | ||
if: steps.frontend-src-cache.outputs.cache-hit != 'true' | ||
run: npm run build:stage | ||
working-directory: frontend | ||
|
||
# Build backend | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
|
||
- name: Install dependencies | ||
if: steps.api-npm-cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
working-directory: api | ||
|
||
# Because of how the deploy works, do not cache backend | ||
# frontend changes _will not_ make it if that's the case | ||
- name: Build backend | ||
run: npm run build | ||
working-directory: api | ||
|
||
- name: Deploy to cloud.gov | ||
uses: cloud-gov/cg-cli-tools@main | ||
with: | ||
cf_api: https://api.fr.cloud.gov | ||
cf_username: ${{secrets.STAGE_CF_USERNAME}} | ||
cf_password: ${{secrets.STAGE_CF_PASSWORD}} | ||
cf_org: gsa-open-opportunities | ||
cf_space: USDS | ||
cf_manifest: deployDemo.yml |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:14.19.0-alpine | ||
FROM node:14.21.1-alpine | ||
|
||
WORKDIR /app | ||
|
||
|
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 1 | ||
applications: | ||
- name: smeqa-demo | ||
instances: 1 | ||
memory: 128MB | ||
env: | ||
NODE_ENV: production | ||
APP_ENV: staging | ||
OPTIMIZE_MEMORY: "true" | ||
TZ: America/New_York | ||
command: node server.js | ||
type: nodejs | ||
path: ./api/build | ||
buildpack: nodejs_buildpack | ||
stack: cflinuxfs3 | ||
services: | ||
- smeqa-demo-db |
74 changes: 74 additions & 0 deletions
74
frontend/src/App/Assessment/Competencies/UngradedCompetency/UngradedCompetency.jsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from "react"; | ||
import classnames from "classnames"; | ||
|
||
import Accordion from "../../../commonComponents/Accordion"; | ||
import RadioGroup from "../../../commonComponents/RadioGroup"; | ||
import Alert from "../../../commonComponents/Alert"; | ||
|
||
const UngradedCompetency = ({ | ||
name, | ||
definition, | ||
requiredProficiencyDefinition, | ||
children, | ||
updateCompetencyDecisionHandler, | ||
isDisabled, | ||
// doesNotMeetClassToggle, | ||
selectors, | ||
competency_selector_id, | ||
justifications, | ||
}) => { | ||
const definitionAccordion = | ||
definition && definition.length ? ( | ||
<Accordion title="Competency Definition" isDrawer={true}> | ||
<div dangerouslySetInnerHTML={{ __html: definition }}></div> | ||
</Accordion> | ||
) : null; | ||
let classNames = classnames({ | ||
"grid-row": true, | ||
"grid-gap-2": true, | ||
"smeqa-rr-comp": true, | ||
// "does-not-meet": doesNotMeetClassToggle, | ||
}); | ||
|
||
const horizontal = selectors.length < 3 ? true : false; | ||
return ( | ||
<div className={classNames}> | ||
<div className="tablet:grid-col-8"> | ||
<h3 className="smeqa-rr-comp__name">{name}</h3> | ||
|
||
<div | ||
dangerouslySetInnerHTML={{ __html: requiredProficiencyDefinition }} | ||
></div> | ||
{justifications && | ||
justifications.map((j, i) => ( | ||
<Alert | ||
key={i} | ||
type="info" | ||
title={`Review ${i + 1}`} | ||
body={j.justification} | ||
></Alert> | ||
))} | ||
{definitionAccordion} | ||
|
||
{children} | ||
</div> | ||
|
||
<div className="tablet:grid-col-4" hidden={true}> | ||
<h4 className="smeqa-rr-comp__title--prof" > | ||
Resume reflects this exprience? | ||
</h4> | ||
<RadioGroup | ||
buttons={selectors} | ||
horizontal={horizontal} | ||
name={name} | ||
selectedRadio={competency_selector_id} | ||
legend={"Please make a proficiency determination"} | ||
disabled={isDisabled} | ||
onChange={updateCompetencyDecisionHandler} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default UngradedCompetency; |
Oops, something went wrong.