Skip to content

Commit

Permalink
chore(CI): add deploy token and git user configs (#4594)
Browse files Browse the repository at this point in the history
* chore(CI): fix husky in git

* chore: add token

* chore: fix target

* chore: add git config
  • Loading branch information
chenjiahan committed Sep 6, 2023
1 parent f864364 commit 0a520f5
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-builder-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ jobs:
repository-name: web-infra-dev/web-infra-dev.github.io
branch: main
folder: packages/document/builder-doc/doc_build
target-folder: builder
token: ${{ secrets.MODERN_DEPLOY_TOKEN }}
target-folder: modern-js/builder
git-config-name: gh-pages-bot
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: true
3 changes: 3 additions & 0 deletions .github/workflows/build-devtools-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ jobs:
repository-name: web-infra-dev/web-infra-dev.github.io
branch: main
folder: packages/devtools/client/dist
token: ${{ secrets.MODERN_DEPLOY_TOKEN }}
target-folder: devtools/${{ github.sha }}
git-config-name: gh-pages-bot
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: true
6 changes: 4 additions & 2 deletions .github/workflows/build-main-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
repository-name: web-infra-dev/web-infra-dev.github.io
branch: main
folder: packages/document/main-doc/doc_build
token: ${{ secrets.MODERN_DEPLOY_TOKEN }}
target-folder: modern-js
git-config-name: gh-pages-bot
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: true
clean-exclude: |
v1/*
Expand All @@ -61,5 +65,3 @@ jobs:
doc-tools/**/*
module-tools/*
module-tools/**/*
devtools/*
devtools/**/*
5 changes: 4 additions & 1 deletion .github/workflows/build-module-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ jobs:
repository-name: web-infra-dev/web-infra-dev.github.io
branch: main
folder: packages/document/module-doc/doc_build
target-folder: module-tools
token: ${{ secrets.MODERN_DEPLOY_TOKEN }}
target-folder: modern-js/module-tools
git-config-name: gh-pages-bot
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com
clean: true
3 changes: 2 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# skip husky in CI
# https://typicode.github.io/husky/guide.html#with-env-variables
[ -n "$CI" ] && exit 0

. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
3 changes: 2 additions & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# skip husky in CI
# https://typicode.github.io/husky/guide.html#with-env-variables
[ -n "$CI" ] && exit 0

. "$(dirname -- "$0")/_/husky.sh"

# avoid conflicts in pnpm lock
# https://7tonshark.com/posts/avoid-conflicts-in-pnpm-lock/
git config merge.ours.driver true
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# skip husky in CI
# https://typicode.github.io/husky/guide.html#with-env-variables
[ -n "$CI" ] && exit 0

. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged

0 comments on commit 0a520f5

Please sign in to comment.