mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-07-04 13:19:20 +00:00
强制bot使用token推送而不是https
This commit is contained in:
parent
6ffc923a31
commit
93a671de20
22
.github/workflows/deploy.yml
vendored
22
.github/workflows/deploy.yml
vendored
@ -7,14 +7,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
with:
|
|
||||||
version: 9
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@ -22,6 +18,11 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
cache-dependency-path: 'src/frontend/pnpm-lock.yaml'
|
cache-dependency-path: 'src/frontend/pnpm-lock.yaml'
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
@ -30,11 +31,16 @@ jobs:
|
|||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
|
- name: Copy 404.html
|
||||||
|
working-directory: src/frontend
|
||||||
|
run: cp build/index.html build/404.html
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
npx gh-pages -d build
|
npx gh-pages -d build -u "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" \
|
||||||
env:
|
--repo "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user