-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
687 additions
and
444 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,35 @@ | ||
--- | ||
name: 'Monorepo install (pnpm)' | ||
description: 'Run pnpm install' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Expose pnpm config(s) through "$GITHUB_OUTPUT" | ||
id: pnpm-config | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Cache rotation keys | ||
id: cache-rotation | ||
shell: bash | ||
run: | | ||
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT | ||
echo "YEAR_WEEK=$(/bin/date -u "+%Y%W")" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
id: pnpm-store-cache | ||
with: | ||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_WEEK }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_WEEK }}- | ||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile --strict-peer-dependencies --prefer-offline | ||
env: | ||
HUSKY: '0' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
name: CI for Docs App | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/docs/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.base.json' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/docs/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.base.json' | ||
|
||
jobs: | ||
integration: | ||
name: Node ${{ matrix.node }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ['ubuntu-22.04'] | ||
node: ['18'] | ||
pnpm: ['7'] | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: ${{ matrix.pnpm }} | ||
run_install: false | ||
|
||
- name: Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'pnpm' | ||
node-version: ${{ matrix.node }} | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
# see https://github.com/vercel/next.js/pull/27362 | ||
- name: Restore "web" app build from cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/apps/docs/.next/cache | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
key: ${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-${{ hashFiles('apps/docs/src/**.[jt]sx?', 'apps/docs/src/**.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}- | ||
- name: Typecheck | ||
working-directory: apps/web | ||
run: | | ||
pnpm lint:types | ||
- name: Linter | ||
working-directory: apps/web | ||
run: | | ||
pnpm lint | ||
- name: Build docs-app | ||
working-directory: apps/web | ||
run: | | ||
pnpm --filter=docs build |
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,113 @@ | ||
--- | ||
name: CI for Web App | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/web/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.base.json' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/web/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
- 'tsconfig.base.json' | ||
|
||
jobs: | ||
integration: | ||
name: Node ${{ matrix.node }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ['ubuntu-22.04'] | ||
node: ['18'] | ||
pnpm: ['7'] | ||
steps: | ||
- name: Check out the codebase | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: ${{ matrix.pnpm }} | ||
run_install: false | ||
|
||
- name: Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: 'pnpm' | ||
node-version: ${{ matrix.node }} | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
# see https://github.com/vercel/next.js/pull/27362 | ||
- name: Restore "web" app build from cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/apps/web/.next/cache | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
key: ${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-${{ hashFiles('apps/web/src/**.[jt]sx?', 'apps/web/src/**.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}- | ||
- name: Typecheck | ||
working-directory: apps/web | ||
run: | | ||
pnpm lint:types | ||
- name: Linter | ||
working-directory: apps/web | ||
run: | | ||
pnpm lint | ||
- name: Build web-app | ||
working-directory: apps/web | ||
run: | | ||
pnpm --filter=web build | ||
env: | ||
# Speed up build: they are linted in a previous step | ||
NEXT_IGNORE_ESLINT: true | ||
# Speed up build: they are type-checked in a previous step | ||
NEXT_IGNORE_TYPECHECK: true | ||
# Speed up build: don't run if not needed, enable if it becomes needed | ||
NEXT_DISABLE_SOURCEMAPS: true | ||
# Don't send telemetry for ci | ||
NEXT_TELEMETRY_DISABLED: true | ||
# To allow checking size-limits | ||
NEXT_DISABLE_SENTRY: false | ||
# Fully disable sentry upload | ||
NEXT_SENTRY_UPLOAD_DRY_RUN: true | ||
|
||
- name: 📉 Check browser bundle size limits | ||
working-directory: apps/web | ||
run: | | ||
pnpm --filter=web lint:size | ||
- name: 🌎 Ecmascript checks for build files | ||
working-directory: apps/web | ||
run: | | ||
pnpm --filter=web lint:dist |
Oops, something went wrong.
1a3aef6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-starter-tpl-web – ./apps/web
next-starter-tpl-web-wayofdev.vercel.app
next-starter-tpl-web-git-master-wayofdev.vercel.app
next-starter-tpl-web.vercel.app
1a3aef6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-starter-tpl-docs – ./apps/docs
next-starter-tpl-docs.vercel.app
next-starter-tpl-docs-wayofdev.vercel.app
next-starter-tpl-docs-git-master-wayofdev.vercel.app