Skip to content

中英文分不同网址展示 #7

中英文分不同网址展示

中英文分不同网址展示 #7

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
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: 'yarn'
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build with Next.js
run: |
yarn build
env:
# BASE_PATH 配置说明:
# - 如果使用 GitHub Pages 默认域名(如 YunjueTech.github.io),设置为 /YunjueTech.github.io
# - 如果使用自定义域名(如 yunjuetech.com),设置为空字符串 '' 或 '/'
# 请根据实际情况修改下面的 BASE_PATH
BASE_PATH: ''
EXPORT: true
UNOPTIMIZED: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4