Skip to content

feat: 让 AI 写同款 #8

feat: 让 AI 写同款

feat: 让 AI 写同款 #8

name: website-pages
on:
push:
branches:
- main
paths:
- 'website/**'
- 'Storage/**'
- '.github/workflows/gh-website-pages.yml'
pull_request:
paths:
- 'website/**'
- 'Storage/**'
- '.github/workflows/gh-website-pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: website-pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
SITE_BASE_URL: /${{ github.event.repository.name }}/
SITE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
cache-dependency-path: website/yarn.lock
- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5
- name: Enable Corepack
run: corepack enable
- name: Install website dependencies
working-directory: website
run: yarn install --frozen-lockfile
- name: Build website
working-directory: website
run: yarn build
- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: website/dist
deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4