Skip to content

Sync all docs with public (2026-03-29) #22

Sync all docs with public (2026-03-29)

Sync all docs with public (2026-03-29) #22

Workflow file for this run

name: Deploy Mingjian Website
on:
push:
branches:
- master
schedule:
- cron: '0 9 * * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build website
run: |
echo "🏗️ Building Mingjian website..."
hugo --quiet
echo "✅ Build completed"
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Deploy to docs directory
run: |
echo "🚀 Deploying to docs directory..."
# Copy instead of move to preserve existing files
rm -rf docs
cp -r public docs
# Add GitHub Pages files
echo "mingjian-ai.github.io" > docs/CNAME
touch docs/.nojekyll
# 检查是否有更改
if git diff --quiet docs/; then
echo "📭 No changes to deploy"
else
echo "📦 Changes detected, committing..."
git add docs/
git commit -m "GitHub Actions: Auto-deploy website $(date -u '+%Y-%m-%d %H:%M:%S')
Build details:
- Hugo version: $(hugo version)
- Build time: $(date -u '+%Y-%m-%d %H:%M:%S UTC')
- Triggered by: ${{ github.event_name }}
- Commit: ${{ github.sha }}"
git push origin master
echo "✅ Deployment completed"
fi
- name: Verify deployment

Check failure on line 68 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 68
run: |
echo "🔍 Verifying deployment..."
if [ -d "docs" ]; then
echo "✅ docs directory exists"
else
echo "❌ docs directory not found"
exit 1