feat: add deployment workflow and update site content for Gitea Pages
All checks were successful
Docker Build and Push Demo / Build-Docker-Image (push) Successful in 56s
All checks were successful
Docker Build and Push Demo / Build-Docker-Image (push) Successful in 56s
This commit is contained in:
37
.gitea/workflows/deploy-pages.yml
Normal file
37
.gitea/workflows/deploy-pages.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
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
|
||||
Reference in New Issue
Block a user