Skip to content

Commit 7ad706c

Browse files
committed
fix(icons-cli): output dir path
1 parent 1636c45 commit 7ad706c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/icons.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
workflow_dispatch:
88

99
env:
10-
OUTPUT_ROOT_DIR: packages/icon-files/
1110
TARGET_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'main' }}
1211

1312
jobs:
@@ -37,12 +36,17 @@ jobs:
3736
env:
3837
FIGMA_FILE_URL: ${{ secrets.FIGMA_FILE_URL }}
3938
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
39+
OUTPUT_ROOT_DIR: ../icon-files/
4040
run: pnpm --filter @charcoal-ui/icons-cli cli:icons figma:export
4141

4242
- name: Optimize icons
43+
env:
44+
OUTPUT_ROOT_DIR: ../icon-files/
4345
run: pnpm --filter @charcoal-ui/icons-cli cli:icons svg:optimize --ignoreFile ../../misc/icons-cli-denylist
4446

4547
- name: Generate icon files
48+
env:
49+
OUTPUT_ROOT_DIR: ../icon-files/
4650
run: pnpm --filter @charcoal-ui/icons-cli cli:icons files:generate
4751

4852
- name: Generate github token
@@ -52,10 +56,15 @@ jobs:
5256
app_id: ${{ secrets.CHARCOAL_BOT_APP_ID }}
5357
private_key: ${{ secrets.CHARCOAL_BOT_PRIVATE_KEY }}
5458

59+
- run: |
60+
pwd
61+
ls -al
62+
5563
- name: Create Pull Request for updated icons
5664
env:
5765
GITHUB_ACCESS_TOKEN: ${{ steps.generate_token.outputs.token }}
5866
GITHUB_REPO_OWNER: pixiv
5967
GITHUB_REPO_NAME: charcoal
6068
GITHUB_DEFAULT_BRANCH: ${{ env.TARGET_BRANCH }}
69+
OUTPUT_ROOT_DIR: ../icon-files/
6170
run: pnpm --filter @charcoal-ui/icons-cli cli:icons github:pr

packages/icons-cli/src/GitHubClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export class GithubClient {
2929
) {
3030
const client = new this(repoOwner, repoName, token, defaultBranch)
3131
const outputDirFullPath = path.resolve(process.cwd(), outputDir)
32+
// eslint-disable-next-line no-console
33+
console.log(outputDirFullPath)
3234
const diff = await client.createTreeFromDiff(outputDirFullPath)
3335
// eslint-disable-next-line no-console
3436
console.log(`${diff.length} files are changed`)

0 commit comments

Comments
 (0)