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
47fd698d8a
commit
a20b160ac7
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
@ -7,14 +7,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# defaults:
|
|
||||||
#run:
|
|
||||||
# working-directory: src/frontend
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Navigate to project
|
|
||||||
run: cd src/frontend && echo "PROJECT_DIR=$(pwd)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@ -26,7 +20,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
cache-dependency-path: src/frontend/pnpm-lock.yaml
|
cache-dependency-path: 'src/frontend/pnpm-lock.yaml'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
@ -36,8 +30,11 @@ jobs:
|
|||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy to GitHub Pages
|
||||||
working-directory: src/frontend
|
working-directory: src/frontend
|
||||||
run: npx gh-pages -d build
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
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