Skip to content

Commit

Permalink
fix(ci): actions not working (#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackHole1 committed Aug 24, 2022
1 parent 71a6dca commit dd343d1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 112 deletions.
57 changes: 3 additions & 54 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:
paths-ignore:
- "docs/**"
- "*.md"
- ".yarnrc"
- "LICENSE"
- ".vscode"
- ".husky"
- "assets"

jobs:
check-code:
Expand All @@ -22,49 +24,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
i18n: &i18n
- 'packages/flat-i18n/locales/*.json'
components: &components
- 'packages/flat-components/**/*.(ts|tsx|css|less)'
# e.g: package.json / tsconfig.json rollup.config.js eslintrc.js
- 'packages/flat-components/*.(js|json)'
- 'packages/flat-components/.eslintignore'
types: &types
- 'packages/flat-types/*.json'
- 'packages/flat-types/**/*.ts'
renderer:
- *components
- *types
- 'desktop/renderer-app/*.(js|json)'
- 'desktop/renderer-app/.eslintignore'
- 'desktop/renderer-app/webpack/**'
- 'desktop/renderer-app/typings/**'
- 'desktop/renderer-app/**/*.(ts|tsx|css|less)'
main:
- *types
- 'desktop/main-app/*.(js|json)'
- 'desktop/main-app/.eslintignore'
- 'desktop/main-app/webpack/**'
- 'desktop/main-app/typings/**'
- 'desktop/main-app/**/*.ts'
flat-web:
- 'web/flat-web/**/*.(ts|tsx)'
- uses: actions/cache@v2
id: pnpm-cache
with:
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
path: |
~/.pnpm-store
./node_modules
./packages/**/node_modules
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
Expand All @@ -74,25 +33,15 @@ jobs:
run: |-
# failure automatically retries 3 times
pnpm i || pnpm i || pnpm i
env:
components: ${{ steps.filter.outputs.components }}
types: ${{ steps.filter.outputs.types }}
renderer: ${{ steps.filter.outputs.renderer }}
main: ${{ steps.filter.outputs.main }}
flatWeb: ${{ steps.filter.outputs.flat-web }}
- name: Build renderer
run: pnpm -F renderer-app build
if: steps.filter.outputs.renderer == 'true'

- name: Build main
run: pnpm -F flat build
if: steps.filter.outputs.main == 'true'

- name: Build flat-web
run: pnpm -F flat-web build
if: steps.filter.outputs.flat-web == 'true'

- name: Check i18n
run: node packages/flat-i18n/scripts/check.js
if: steps.filter.outputs.i18n == 'true'
1 change: 0 additions & 1 deletion .github/workflows/check-spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
pull_request:
branches:
- main
- dev

jobs:
check-spell:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/cache@v2
id: pnpm-cache
with:
key: pnpm-storybook-v1-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-storybook-v1-${{ runner.os }}-
path: |
~/.pnpm-store
./node_modules
./packages/**/node_modules
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
Expand All @@ -34,14 +23,6 @@ jobs:
run: |-
# failure automatically retries 3 times
pnpm i || pnpm i || pnpm i
env:
components: true
if: steps.pnpm-cache.outputs.cache-hit != 'true'

- name: Build Types
# it must be added here, otherwise when the cache matches, there will be flat-types not found
run: pnpm -F flat-types build
if: steps.pnpm-cache.outputs.cache-hit == 'true'
- name: Build Storybook
run: pnpm -F flat-components build
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/deploy-web-dev-cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ on:
push:
branches:
- "main"
- "big-classroom-hand-raise"
paths:
- "config/**"
- "web/flat-web/**"
- "packages/flat-components/src/**"
- "packages/flat-i18n/locales/**"
- "packages/flat-types/src/**"
- "services/rtc/flat-rtc/src/**"
- "services/rtc/flat-rtc-agora-web/src/**"
- ".github/workflows/deploy-web-dev-cn.yml"
- "only-deploy-prod-web"

jobs:
deploy-flat-web-dev:
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/deploy-web-dev-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ on:
push:
branches:
- "main"
- "big-classroom-hand-raise"
paths:
- "config/**"
- "web/flat-web/**"
- "packages/flat-components/src/**"
- "packages/flat-i18n/locales/**"
- "packages/flat-types/src/**"
- "services/rtc/flat-rtc/src/**"
- "services/rtc/flat-rtc-agora-web/src/**"
- ".github/workflows/deploy-web-dev-us.yml"
- "only-deploy-prod-web"

jobs:
deploy-flat-web-dev:
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/deploy-web-prod-cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ on:
branches:
- "stable"
- "only-deploy-prod-web"
paths:
- "config/**"
- "web/flat-web/**"
- "packages/flat-components/src/**"
- "packages/flat-i18n/locales/**"
- "packages/flat-types/src/**"
- "services/rtc/flat-rtc/src/**"
- "services/rtc/flat-rtc-agora-web/src/**"
- ".github/workflows/deploy-web-prod-cn.yml"

jobs:
deploy-flat-web-prod:
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/deploy-web-prod-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ on:
branches:
- "stable"
- "only-deploy-prod-web"
paths:
- "config/**"
- "web/flat-web/**"
- "packages/flat-components/src/**"
- "packages/flat-i18n/locales/**"
- "packages/flat-types/src/**"
- "services/rtc/flat-rtc/src/**"
- "services/rtc/flat-rtc-agora-web/src/**"
- ".github/workflows/deploy-web-prod-us.yml"

jobs:
deploy-flat-web-prod:
Expand Down

0 comments on commit dd343d1

Please sign in to comment.