forked from LHRUN/paint-board
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add styleLint and deploy action
- Loading branch information
Showing
8 changed files
with
3,905 additions
and
2,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: deploy gh-page | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
build: | ||
name: build and deploy gh-page | ||
env: | ||
COMMIT_SECRET: ${{secrets.commit_secret}} | ||
USER_NAME: songlh | ||
USER_EMAIL: [email protected] | ||
PUBLISH_DIR: ./dist | ||
GITHUB_REPOSITORY: paint-board | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository main branch | ||
uses: actions/checkout@main | ||
- name: with node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- name: npm install | ||
run: | | ||
npm install -g pnpm | ||
pnpm install | ||
- name: npm run build | ||
run: | | ||
pnpm build | ||
- name: commit files | ||
run: | | ||
cd $PUBLISH_DIR | ||
git init | ||
git config --local user.name $USER_NAME | ||
git config --local user.email $USER_EMAIL | ||
git status | ||
git remote add origin https://[email protected]/$GITHUB_REPOSITORY.git | ||
git checkout -b gh-pages | ||
git add --all | ||
git commit -m "deploy to github pages" | ||
git push origin gh-pages -f | ||
echo deploy gh-pages complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
// 注册 stylelint 的 prettier 插件 | ||
plugins: ['stylelint-prettier'], | ||
// 继承一系列规则集合 | ||
extends: [ | ||
// standard 规则集合 | ||
'stylelint-config-standard', | ||
// 样式属性顺序规则 | ||
'stylelint-config-recess-order', | ||
// 接入 Prettier 规则 | ||
'stylelint-config-prettier', | ||
'stylelint-prettier/recommended' | ||
], | ||
overrides: [ | ||
{ | ||
files: ['**/*.tsx'], | ||
customSyntax: '@stylelint/postcss-css-in-js', | ||
}, | ||
], | ||
// 配置 rules | ||
rules: { | ||
// 开启 Prettier 自动格式化功能 | ||
'prettier/prettier': true, | ||
"at-rule-no-unknown": [ | ||
true, | ||
{ | ||
"ignoreAtRules": ["tailwind"] | ||
} | ||
], | ||
"selector-class-pattern": "^[a-z][a-zA-Z0-9]+$" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.