Skip to content

add favicon.ico to avoid strange problems maybe #17

add favicon.ico to avoid strange problems maybe

add favicon.ico to avoid strange problems maybe #17

Workflow file for this run

# Code 分支推送部署预览
## 仅部署 Win 端
name: Build Code
on:
push:
branches:
- code
jobs:
release:
name: Build Website
runs-on: windows-latest
steps:
# 检出 Git 仓库
- name: Check out git repository
uses: actions/[email protected]
# 安装 Node.js
- name: Install Node.js
uses: actions/[email protected]
with:
node-version: "18.x"
# 复制环境变量文件
- name: Copy .env.example
run: |
if (-not (Test-Path .env)) {
Copy-Item .env.example .env
} else {
Write-Host ".env file already exists. Skipping the copy step."
}
# 安装项目依赖
- name: Install Dependencies
run: npm install
# 构建程序
- name: Build Website
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 上传构建产物
- name: Upload artifacts
# 链接 https://github.com/actions/upload-artifact/
uses: actions/[email protected]
with:
name: Homepage
path: dist
# TODO 以下是自动化将打包的静态页面部署到 gh-pages 分支的脚本
# 部署到 gh-pages 分支
- name: Deploy to gh-pages
# 链接 https://github.com/crazy-max/ghaction-github-pages/
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: dist
keep_history: true
fqdn: lzx0626.me
allow_empty_commit: false
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}