Skip to content

Commit

Permalink
Add gh-pages to package to project. Add and update for publishing to …
Browse files Browse the repository at this point in the history
…github pages. Add workflows for publish and e2e testing.
  • Loading branch information
jbouder committed Oct 7, 2023
1 parent 930b59f commit ee2ad29
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Deploy
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Build
run: npm run deploy
25 changes: 25 additions & 0 deletions .github/workflows/run-e2e-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run End-to-end Testing
on:
workflow_run:
workflows: ['Build and Deploy']
types:
- completed
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Build
run: npm run e2e:ci
198 changes: 198 additions & 0 deletions package-lock.json

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

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "comet-starter",
"homepage": "https://metrostar.github.io/comet-starter/",
"private": true,
"version": "1.0.0",
"description": "React and TypeScript starter app, pre-configured with the Comet component library and other tools.",
Expand All @@ -25,7 +26,9 @@
"e2e:ci:run": "rm cypress/reports/* || true && npx cypress run --reporter mochawesome",
"e2e:ci:report": "mochawesome-merge cypress/reports/*.json > cypress/reports/report.json && marge --reportDir cypress/reports cypress/reports/report.json",
"e2e:format": "npx prettier cypress --write",
"prepare": "husky install"
"prepare": "husky install",
"predeploy": "vite build --base=/comet-starter/",
"deploy": "gh-pages -d dist"
},
"dependencies": {
"@metrostar/comet-data-viz": "1.1.1",
Expand Down Expand Up @@ -65,6 +68,7 @@
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.3",
"gh-pages": "^6.0.0",
"husky": "8.0.3",
"jest": "29.6.2",
"jest-environment-jsdom": "29.6.2",
Expand Down

0 comments on commit ee2ad29

Please sign in to comment.