Skip to content

Commit

Permalink
Merge pull request #351 from liam-hq/replace-to-root
Browse files Browse the repository at this point in the history
maintenance: Move package.json to the repository root
  • Loading branch information
MH4GF authored Dec 24, 2024
2 parents 6d88c2b + af6c94b commit 35c7a2b
Show file tree
Hide file tree
Showing 18 changed files with 1,057 additions and 1,117 deletions.
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: License Compliance for frontend
name: License Compliance

# ## Summary
#
Expand All @@ -15,9 +15,6 @@ on:
pull_request:
merge_group:

env:
working-directory: frontend

jobs:
license_finder:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -53,12 +50,12 @@ jobs:
id: cache
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') }}
.github/workflows/license.yml
config/dependency_decisions.yml
config/license_finder.yml
package.json
pnpm-lock.yaml
key: license-${{ runner.os }}-${{ hashFiles('.github/workflows/license.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.
File renamed without changes.
Loading

0 comments on commit 35c7a2b

Please sign in to comment.