mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-07-04 13:19:20 +00:00
修
This commit is contained in:
parent
926034563c
commit
3b82e88cd9
24
.github/workflows/deploy.yml
vendored
24
.github/workflows/deploy.yml
vendored
@ -8,6 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
@ -19,12 +20,27 @@ jobs:
|
|||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '23'
|
node-version: '22'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
run: npm install -g pnpm
|
run: npm install -g pnpm
|
||||||
- run: pnpm install
|
|
||||||
- run: pnpm run build
|
- name: Install dependencies
|
||||||
- run: npx gh-pages -d build
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: pnpm run build
|
||||||
|
|
||||||
|
- name: Copy 404.html for React Router support
|
||||||
|
run: cp build/index.html build/404.html
|
||||||
|
|
||||||
|
- name: Configure Git identity
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
run: npx gh-pages -d build
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user