mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-07-04 21:29:18 +00:00
调试githubAction
This commit is contained in:
parent
0f01772ba4
commit
3ecf4bc5e4
29
.github/workflows/deploy.yml
vendored
29
.github/workflows/deploy.yml
vendored
@ -1,12 +1,11 @@
|
|||||||
name: Deploy React App from src/frontend
|
name: Deploy React App
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -15,6 +14,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# 调试:检查文件结构(临时添加)
|
||||||
|
- name: Debug - Check files
|
||||||
|
run: |
|
||||||
|
echo "Root directory:"
|
||||||
|
ls -la
|
||||||
|
echo "Frontend directory:"
|
||||||
|
ls -la src/frontend/
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
@ -24,21 +31,17 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
registry-url: https://registry.npmjs.org
|
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: |
|
||||||
|
cd src/frontend
|
||||||
|
pnpm install
|
||||||
|
|
||||||
- name: Build project
|
- name: Build
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Configure Git identity
|
- name: Deploy
|
||||||
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
|
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