Skip to content

更新笑笑api头像和首页图片 #31

更新笑笑api头像和首页图片

更新笑笑api头像和首页图片 #31

Workflow file for this run

name: Deploy to Blog Branch
on:
# 每次推送到 `main` 分支时触发这个"工作流程"
# 如果你使用了别的分支名,请按需将 `main` 替换成你的分支名
push:
branches: [ main ]
# 允许你在 GitHub 上的 Actions 标签中手动触发此"工作流程"
workflow_dispatch:
# 需要写入权限来推送到blog分支
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
if [ -f "package-lock.json" ]; then
npm ci
elif [ -f "yarn.lock" ]; then
yarn install --frozen-lockfile
elif [ -f "pnpm-lock.yaml" ]; then
npm install -g pnpm
pnpm install --frozen-lockfile
else
npm install
fi
- name: Build site
run: |
if [ -f "package.json" ]; then
npm run build
fi
- name: Deploy to blog branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: blog # 部署到blog分支
folder: dist # Astro默认构建输出目录
clean: true # 清理目标分支中的旧文件