Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
v1xingyue authored Jan 8, 2025
1 parent 9eacabe commit 79b25c3
Showing 1 changed file with 19 additions and 30 deletions.
49 changes: 19 additions & 30 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,24 @@ permissions:
id-token: write

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install Pnpm
run: npm install -g pnpm

- name: Install
run: pnpm install

- name: Build
run: pnpm run build

- name: Add cname
run: echo "eliza101.xyz" > ./packages/page/dist//CNAME

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/page/dist/
# 保持提交历史
force_orphan: false
commit_message: 'deploy: ${{ github.event.head_commit.message }}'
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Run build
run: pnpm run build

0 comments on commit 79b25c3

Please sign in to comment.