Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintenance: Move package.json to the repository root #351

Merged
merged 6 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/pnpm-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: pnpm-setup

inputs:
working-directory:
required: true
required: false
type: string
default: '.'

runs:
using: composite
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/figma-to-css-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Figma to CSS Variables
on:
workflow_dispatch:

env:
working-directory: frontend

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -19,15 +16,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup
with:
working-directory: ${{ env.working-directory }}
- run: pnpm --filter @packages/figma-to-css-variables sync --output '../../apps/service-site/src/styles' --filter-modes "Dark,Mode 1"
env:
FIGMA_FILE_KEY: ${{ secrets.FIGMA_FILE_KEY }}
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
merge_group:

env:
working-directory: frontend

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -34,15 +31,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup
with:
working-directory: ${{ env.working-directory }}
- run: pnpm lint

frontend-ci:
Expand All @@ -51,13 +42,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
working-directory: ${{ env.working-directory }}

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup
with:
working-directory: ${{ env.working-directory }}
- run: pnpm test:turbo
22 changes: 7 additions & 15 deletions .github/workflows/license-frontend.yml
MH4GF marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
pull_request:
merge_group:

env:
working-directory: frontend

jobs:
license_finder:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,11 +51,11 @@ jobs:
with:
path: |
.github/workflows/license-frontend.yml
frontend/config/dependency_decisions.yml
frontend/config/license_finder.yml
frontend/package.json
frontend/pnpm-lock.yaml
key: license-frontend-${{ runner.os }}-${{ hashFiles('.github/workflows/license-frontend.yml', 'frontend/config/dependency_decisions.yml', 'frontend/config/license_finder.yml', 'frontend/package.json', 'frontend/pnpm-lock.yaml') }}
config/dependency_decisions.yml
config/license_finder.yml
package.json
pnpm-lock.yaml
key: license-frontend-${{ runner.os }}-${{ hashFiles('.github/workflows/license-frontend.yml', 'config/dependency_decisions.yml', 'config/license_finder.yml', 'package.json', 'pnpm-lock.yaml') }}
- name: Determine if files changed
id: determine
run: |
Expand All @@ -69,8 +66,6 @@ jobs:
fi
- uses: ./.github/actions/pnpm-setup
if: steps.determine.outputs.files_changed == 'true'
with:
working-directory: ${{ env.working-directory }}
- uses: ruby/setup-ruby@v1
if: steps.determine.outputs.files_changed == 'true'
with:
Expand All @@ -81,27 +76,25 @@ jobs:
- name: Run License Finder
if: steps.determine.outputs.files_changed == 'true'
run: license_finder
working-directory: ${{ env.working-directory }}

# Commit the License Finder report as docs/packages-license.md
- name: Generate license report
if: |
steps.fork-check.outputs.is_fork != 'true'
&& steps.determine.outputs.files_changed == 'true'
&& github.ref_name != github.event.repository.default_branch
&& github.event_name != 'merge_group'
&& github.event_name != 'merge_group'
run: |
mkdir -p "$(dirname "$LICENSE_REPORT")"
license_finder report --format=markdown | tail -n +2 > "$LICENSE_REPORT"
# Delete the timestamp line because there will be a difference even if there is no change in licenses
sed -e '/^As of /d' -i "$LICENSE_REPORT"
working-directory: ${{ env.working-directory }}
- name: Commit license report and push
if: |
steps.fork-check.outputs.is_fork != 'true'
&& steps.determine.outputs.files_changed == 'true'
&& github.ref_name != github.event.repository.default_branch
&& github.event_name != 'merge_group'
&& github.event_name != 'merge_group'
run: |
if git diff --quiet; then
echo 'No changes to commit'
Expand All @@ -115,4 +108,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
working-directory: ${{ env.working-directory }}
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
push:
branches:
- main
env:
working-directory: frontend

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -30,17 +28,10 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
sparse-checkout: |
.github
${{ env.working-directory }}
- uses: ./.github/actions/pnpm-setup
with:
working-directory: ${{ env.working-directory }}

- name: Create Release Pull Request or Publish to npm
uses: changesets/[email protected]
with:
cwd: ${{ env.working-directory }}
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/vercel-deploy-erd-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup
with:
working-directory: frontend
- name: Install Vercel CLI
run: pnpm add --global vercel@latest
- name: Pull Vercel Enviroment Infomation
run: vercel pull --yes --environment=${{ needs.setup-deployment.outputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Run prepare command
run: pnpm build
working-directory: frontend
- name: Update index.html content
run: pnpm --filter ${{ matrix.apps.name }} update_dist_content
working-directory: frontend
- name: Build Project Artifacts
run: vercel build ${{ needs.setup-deployment.outputs.environment == 'production' && '--prod' || '' }}
- name: Deploy Project Artifacts to Vercel
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup
with:
working-directory: frontend
- name: Install Vercel CLI
run: pnpm add --global vercel@latest
- name: Pull Vercel Enviroment Infomation
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.turbo
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading