Skip to content

Commit

Permalink
fix: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
icai committed Apr 10, 2024
1 parent 04c32d0 commit c43079c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ name: NodeJS with Webpack

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: |
npm install -g pnpm
pnpm install
- name: Build project
run: pnpm run build:h5

- name: Deploy on master branch
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.event.pull_request == null
run: |
export TRAVIS_COMMIT_MSG="$(git log --format='%h - %B' --no-merges -n 1)"
export TRAVIS_COMMIT_USER="$(git log --no-merges -n 1 --format=%an)"
export TRAVIS_COMMIT_EMAIL="$(git log --no-merges -n 1 --format=%ae)"
export ROT_TOKEN=${{ secrets.GITHUB_TOKEN }}
sh build/deploy-ci.sh
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: |
npm install -g pnpm
pnpm install
- name: Build project
run: pnpm run build:h5

- name: Deploy on master branch
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.event.pull_request == null
run: |
export COMMIT_MSG="$(git log --format='%h - %B' --no-merges -n 1)"
export COMMIT_USER="$(git log --no-merges -n 1 --format=%an)"
export COMMIT_EMAIL="$(git log --no-merges -n 1 --format=%ae)"
export ROT_TOKEN="${{ secrets.GITHUB_TOKEN }}"
sh build/deploy-ci.sh
2 changes: 1 addition & 1 deletion build/deploy-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ git clone --depth 1 -b gh-pages --single-branch https://[email protected]/ic
cp -rf ../../dist/** .
cp -rf ../../README.md .
git add -A .
git commit -m "$TRAVIS_COMMIT_MSG"
git commit -m "$COMMIT_MSG"
git push origin gh-pages
cd ../..

Expand Down
2 changes: 1 addition & 1 deletion src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Login: React.FC = () => {
showMessage('令牌格式错误,应为36位UUID字符串');
return false;
}
dispatch(auth(token) as any)
auth(token)(dispatch)
redirectTo({ url: '/pages/index/index' });
};

Expand Down

0 comments on commit c43079c

Please sign in to comment.