All checks were successful
Docker Build and Push Demo / Build-Docker-Image (push) Successful in 56s
38 lines
942 B
YAML
38 lines
942 B
YAML
name: Deploy to Pages
|
|
run-name: ${{ gitea.actor }} is deploying to Gitea Pages 📄
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'site/**' # Only trigger when site files change
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout main branch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: main
|
|
|
|
- name: Checkout pages branch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: pages
|
|
path: pages
|
|
|
|
- name: Copy site files
|
|
run: |
|
|
# Copy site files from main to pages
|
|
cp -r main/site/* pages/
|
|
|
|
- name: Deploy to pages branch
|
|
run: |
|
|
cd pages
|
|
git config user.name "Gitea Actions"
|
|
git config user.email "actions@gitea.local"
|
|
|
|
git add .
|
|
git diff --staged --quiet || git commit -m "Deploy from main branch: ${{ gitea.sha }}"
|
|
git push
|