Skip to content

Commit dbb4512

Browse files
committed
Merge branch 'main' of https://github.com/EOS-uiux-Solutions/user-story into ops/eslint
2 parents 112f3f8 + 9ef517e commit dbb4512

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy site
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository code
13+
uses: actions/checkout@v2
14+
15+
- name: Cache node_modules
16+
id: cache-node-modules
17+
uses: actions/cache@v2
18+
with:
19+
path: node_modules
20+
key: node_modules-deploy-${{ hashFiles('package-lock.json') }}
21+
22+
- name: Install node modules
23+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
24+
run: npm install
25+
26+
- name: Build the site
27+
run: |
28+
echo "$CONFIG_JSON" > src/config.json
29+
npm run build
30+
cp build/index.html build/404.html
31+
env:
32+
CONFIG_JSON: ${{ secrets.CONFIG_JSON }}
33+
34+
- name: Deploy
35+
uses: s0/git-publish-subdir-action@develop
36+
env:
37+
REPO: self
38+
BRANCH: gh-pages
39+
FOLDER: build
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/github-ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Run Tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
cache_node_modules:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository code
11+
uses: actions/checkout@v2
12+
13+
- name: Cache node_modules
14+
id: cache-node-modules
15+
uses: actions/cache@v2
16+
with:
17+
path: node_modules
18+
key: node_modules-${{ hashFiles('package-lock.json') }}
19+
20+
- name: Install dependencies
21+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
22+
run: npm install
23+
24+
test_lints_sass:
25+
needs: cache_node_modules
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout repository code
30+
uses: actions/checkout@v2
31+
32+
- name: Load node_modules
33+
id: cache-node-modules
34+
uses: actions/cache@v2
35+
with:
36+
path: node_modules
37+
key: node_modules-${{ hashFiles('package-lock.json') }}
38+
39+
- name: Install node_modules
40+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
41+
run: npm install
42+
43+
- name: Test SASS
44+
run: npm run test:sass
45+
46+
test_lints_js:
47+
needs: cache_node_modules
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout repository code
52+
uses: actions/checkout@v2
53+
54+
- name: Load node_modules
55+
id: cache-node-modules
56+
uses: actions/cache@v2
57+
with:
58+
path: node_modules
59+
key: node_modules-${{ hashFiles('package-lock.json') }}
60+
61+
- name: Install node_modules
62+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
63+
run: npm install
64+
65+
- name: Test JS
66+
run: npm run test:js

0 commit comments

Comments
 (0)