-
Notifications
You must be signed in to change notification settings - Fork 2
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 #2 from teambit/add-nextjs-health-status
Add GHA for Next.js workspace & app creation
- Loading branch information
Showing
4 changed files
with
226 additions
and
0 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,57 @@ | ||
name: Next.js - Bare Starter - Nightly | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bitsrc/ops:latest | ||
env: | ||
HOME: /home/bituser | ||
|
||
steps: | ||
- name: Initialize a workspace | ||
run: | | ||
bit | ||
bvm | ||
bvm config set RELEASE_TYPE nightly | ||
bvm upgrade | ||
bit new nextjs my-nextjs-workspace --env teambit.nextjs/nextjs --log error | ||
- name: Check initial status | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list --log error | ||
bit status --log error | ||
bit templates --log error | ||
- name: Create a new app | ||
run: | | ||
cd my-nextjs-workspace | ||
bit create nextjs apps/my-nextjs-app | ||
bit install --log error | ||
bit list --log error | ||
bit use apps/my-nextjs-app | ||
bit app list --log error | ||
bit status --log error | ||
bit run my-nextjs-app & | ||
checkserver http://localhost:3000 | ||
- name: Lint & test | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list --log error | ||
bit status --log error | ||
bit lint --log error | ||
bit test --log error | ||
- name: Create a local scope, compile and export | ||
run: | | ||
barescope my-org.my-scope-name my-nextjs-workspace | ||
cd my-nextjs-workspace | ||
bit scope rename org.scope-name my-org.my-scope-name --refactor --log error | ||
bit link --log error | ||
bit compile --log error | ||
bit tag --message "initial tag" --log error | ||
bit export --log error | ||
continue-on-error: false |
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,56 @@ | ||
name: Next.js - Bare Starter | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bitsrc/ops:latest | ||
env: | ||
HOME: /home/bituser | ||
|
||
steps: | ||
- name: Initialize a workspace | ||
run: | | ||
bit | ||
bvm | ||
bvm upgrade | ||
bit new nextjs my-nextjs-workspace --env teambit.nextjs/nextjs | ||
- name: Check initial status | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list --log error | ||
bit status --log error | ||
bit templates --log error | ||
- name: Create a new app | ||
run: | | ||
cd my-nextjs-workspace | ||
bit create nextjs apps/my-nextjs-app | ||
bit install | ||
bit list | ||
bit use apps/my-nextjs-app | ||
bit app list | ||
bit status | ||
bit run my-nextjs-app & | ||
checkserver http://localhost:3000 | ||
- name: Lint and test | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list | ||
bit status | ||
bit lint | ||
bit test | ||
- name: Create a local scope, compile and export | ||
run: | | ||
barescope my-org.my-scope-name my-nextjs-workspace | ||
cd my-nextjs-workspace | ||
bit scope rename org.scope-name my-org.my-scope-name --refactor | ||
bit link | ||
bit compile | ||
bit tag --message "initial tag" | ||
bit export | ||
continue-on-error: false |
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,57 @@ | ||
name: Next.js - Bare Starter | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bitsrc/ops:latest | ||
env: | ||
HOME: /home/bituser | ||
|
||
steps: | ||
- name: Initialize a new workspace | ||
run: | | ||
bit | ||
bvm | ||
bvm config set RELEASE_TYPE nightly | ||
bvm upgrade | ||
bit init my-nextjs-workspace --default-scope my-org.my-scope --log error | ||
- name: Create a Next.js app component | ||
run: | | ||
cd my-nextjs-workspace | ||
bit create nextjs apps/my-nextjs-app --aspect teambit.nextjs/nextjs --log error | ||
bit use apps/my-nextjs-app --log error | ||
- name: Show components, envs and status | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list --log error | ||
bit envs --log error | ||
bit status --log error | ||
- name: Compile, lint, test components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit compile --log error | ||
bit lint --log error | ||
bit test --log error | ||
- name: Run Next.js app component | ||
run: | | ||
cd my-nextjs-workspace | ||
bit run my-nextjs-app --log error & | ||
checkserver http://localhost:3000 | ||
- name: Tag components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit tag --message "initial tag" --log error | ||
- name: Create a local scope | ||
run: | | ||
barescope my-org.my-scope my-nextjs-workspace | ||
- name: Export components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit export --log error | ||
continue-on-error: false |
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,56 @@ | ||
name: Next.js - Bare Starter | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bitsrc/ops:latest | ||
env: | ||
HOME: /home/bituser | ||
|
||
steps: | ||
- name: Initialize a new workspace | ||
run: | | ||
bit | ||
bvm | ||
bvm upgrade | ||
bit init my-nextjs-workspace --default-scope my-org.my-scope --log error | ||
- name: Create a Next.js app component | ||
run: | | ||
cd my-nextjs-workspace | ||
bit create nextjs apps/my-nextjs-app --aspect teambit.nextjs/nextjs --log error | ||
bit use apps/my-nextjs-app --log error | ||
- name: Show components, envs and status | ||
run: | | ||
cd my-nextjs-workspace | ||
bit list --log error | ||
bit envs --log error | ||
bit status --log error | ||
- name: Compile, lint, test components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit compile --log error | ||
bit lint --log error | ||
bit test --log error | ||
- name: Run Next.js app component | ||
run: | | ||
cd my-nextjs-workspace | ||
bit run my-nextjs-app --log error & | ||
checkserver http://localhost:3000 | ||
- name: Tag components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit tag --message "initial tag" --log error | ||
- name: Create a local scope | ||
run: | | ||
barescope my-org.my-scope my-nextjs-workspace | ||
- name: Export components | ||
run: | | ||
cd my-nextjs-workspace | ||
bit export --log error | ||
continue-on-error: false |