From 2377630ce5d7a6cda3720173bd21ed73f4bf49de Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 10:39:15 -0500 Subject: [PATCH 1/9] removing build, will add to github --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 07312fda3..9a9b1d404 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,7 @@ "dependencies": {}, "husky": { "hooks": { - "pre-commit": "npm run lint", - "pre-push": "npm run build" + "pre-commit": "npm run lint" } }, "devDependencies": { From 7ba6f027d2f396adb9bdd7d77da7f6ac5ffa4232 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 10:39:42 -0500 Subject: [PATCH 2/9] add dev build command --- .github/workflows/dev-main-build.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/dev-main-build.yml diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml new file mode 100644 index 000000000..91eb7bc00 --- /dev/null +++ b/.github/workflows/dev-main-build.yml @@ -0,0 +1,31 @@ +name: dev-main-build + +on: + push: + branches: [ dev ] + paths: 'frontend/main' + pull_request: + branches: [ dev ] + paths: 'frontend/main' + + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Setup Node.js environment + uses: actions/setup-node@v2.1.4 + with: + node-version: 12 + - run: npm install + - run: npm run build \ No newline at end of file From 3b34684d81948c1c63efaecd3b939785d6678a48 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 10:41:53 -0500 Subject: [PATCH 3/9] add tsc check to commit --- frontend/admin/package.json | 2 +- frontend/main/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/admin/package.json b/frontend/admin/package.json index e832934a4..b5b1ff50a 100644 --- a/frontend/admin/package.json +++ b/frontend/admin/package.json @@ -10,7 +10,7 @@ "analyze": "cross-env ANALYZE=true next build", "analyze:server": "cross-env BUNDLE_ANALYZE=server next build", "analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build", - "lint": "eslint . --quiet --ext .ts,.tsx" + "lint": "eslint . --quiet --ext .ts,.tsx && tsc --noEmit" }, "dependencies": { "@emotion/cache": "^11.1.3", diff --git a/frontend/main/package.json b/frontend/main/package.json index 23276cc5a..149ceaca7 100644 --- a/frontend/main/package.json +++ b/frontend/main/package.json @@ -10,7 +10,7 @@ "analyze": "cross-env ANALYZE=true next build", "analyze:server": "cross-env BUNDLE_ANALYZE=server next build", "analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build", - "lint": "eslint . --quiet --ext .ts,.tsx" + "lint": "eslint . --quiet --ext .ts,.tsx && tsc --noEmit" }, "dependencies": { "@babel/core": "^7.12.10", From 50905e6ad5b52b80539cdb68e9a03a93f1422a68 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 11:54:48 -0500 Subject: [PATCH 4/9] add bootstrap --- .github/workflows/dev-main-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index 91eb7bc00..fd1cf6708 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -28,4 +28,5 @@ jobs: with: node-version: 12 - run: npm install + - run: npm run bootstrap - run: npm run build \ No newline at end of file From c86696d848d52e1b4510bfbfba27b2531603154a Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 11:57:20 -0500 Subject: [PATCH 5/9] needs newline --- .github/workflows/dev-main-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index fd1cf6708..e98959cee 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -29,4 +29,4 @@ jobs: node-version: 12 - run: npm install - run: npm run bootstrap - - run: npm run build \ No newline at end of file + - run: npm run build From 0d68e799ade721c01cbcd4d4402b5f77496323fe Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 12:03:27 -0500 Subject: [PATCH 6/9] adjust to build main only --- .github/workflows/dev-main-build.yml | 2 +- frontend/main/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index e98959cee..4041d7e90 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -27,6 +27,6 @@ jobs: uses: actions/setup-node@v2.1.4 with: node-version: 12 + working-directory: ./frontend/main - run: npm install - - run: npm run bootstrap - run: npm run build diff --git a/frontend/main/package.json b/frontend/main/package.json index 149ceaca7..f625de53c 100644 --- a/frontend/main/package.json +++ b/frontend/main/package.json @@ -1,6 +1,6 @@ { "name": "ccd-main", - "version": "0.1.0", + "version": "0.1.1", "private": true, "scripts": { "dev": "cross-env NODE_OPTIONS='--inspect=9230' next -p 3000", From 64730c8501376a69de24708121be1b6d4f99078a Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 12:12:30 -0500 Subject: [PATCH 7/9] moved default working-directory --- .github/workflows/dev-main-build.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index 4041d7e90..27fd05706 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -7,26 +7,20 @@ on: pull_request: branches: [ dev ] paths: 'frontend/main' - - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel +defaults: + run: + working-directory: ./frontend/main + jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - name: Setup Node.js environment uses: actions/setup-node@v2.1.4 with: node-version: 12 - working-directory: ./frontend/main - run: npm install - run: npm run build From 2389d8d779b7b38e0d781f24fa98f8a547342cce Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 12:16:31 -0500 Subject: [PATCH 8/9] remove lower working directory --- .github/workflows/dev-main-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index 91f9dc6e7..27fd05706 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -22,6 +22,5 @@ jobs: uses: actions/setup-node@v2.1.4 with: node-version: 12 - working-directory: ./frontend/main - run: npm install - run: npm run build From b211b240f1b90c3d3cea6a388cace0917e825021 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 14 Jan 2021 15:18:31 -0500 Subject: [PATCH 9/9] adding vercel deploy --- .github/workflows/dev-main-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/dev-main-build.yml b/.github/workflows/dev-main-build.yml index 27fd05706..eaff0b2ff 100644 --- a/.github/workflows/dev-main-build.yml +++ b/.github/workflows/dev-main-build.yml @@ -1,4 +1,5 @@ name: dev-main-build +environment: dev on: push: @@ -24,3 +25,13 @@ jobs: node-version: 12 - run: npm install - run: npm run build + - name: Deploy dev + uses: amondnet/vercel-action@v19 + id: vercel-action-staging + if: github.event_name == 'push' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-args: '--prod'