Add Gitea Actions workflow and sample site
Some checks failed
Deploy to CF Multisite / deploy (push) Failing after 15s
Some checks failed
Deploy to CF Multisite / deploy (push) Failing after 15s
This commit is contained in:
37
.gitea/workflows/deploy.yml
Normal file
37
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Deploy to CF Multisite
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install AWS CLI
|
||||||
|
run: |
|
||||||
|
curl -sL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||||
|
unzip -q awscliv2.zip
|
||||||
|
sudo ./aws/install
|
||||||
|
|
||||||
|
- name: Deploy to R2
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_KEY }}
|
||||||
|
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
|
||||||
|
run: |
|
||||||
|
# 저장소 이름을 사이트 ID로 사용
|
||||||
|
SITE_ID="${{ github.event.repository.name }}"
|
||||||
|
|
||||||
|
aws s3 sync . "s3://multisite-bucket/sites/${SITE_ID}/" \
|
||||||
|
--endpoint-url "${R2_ENDPOINT}" \
|
||||||
|
--region auto \
|
||||||
|
--exclude ".git/*" \
|
||||||
|
--exclude ".gitea/*" \
|
||||||
|
--exclude "README.md" \
|
||||||
|
--delete
|
||||||
|
|
||||||
|
echo "Deployed to: https://${SITE_ID}.actions.it.com"
|
||||||
62
index.html
Normal file
62
index.html
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Multisite Demo - Gitea Actions</title>
|
||||||
|
<style>
|
||||||
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
|
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
background: linear-gradient(90deg, #00d2ff, #3a7bd5);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
p { font-size: 1.25rem; opacity: 0.8; margin-bottom: 2rem; }
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
background: rgba(255,255,255,0.1);
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
border-radius: 20px;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
.stack { margin-top: 2rem; }
|
||||||
|
.stack span {
|
||||||
|
display: inline-block;
|
||||||
|
background: rgba(255,255,255,0.05);
|
||||||
|
padding: 0.25rem 0.75rem;
|
||||||
|
margin: 0.25rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>Gitea Actions 배포 성공!</h1>
|
||||||
|
<p>이 페이지는 Gitea Actions를 통해 자동 배포되었습니다.</p>
|
||||||
|
<div class="badge">multisite-demo.actions.it.com</div>
|
||||||
|
<div class="stack">
|
||||||
|
<span>Gitea</span>
|
||||||
|
<span>Actions</span>
|
||||||
|
<span>R2</span>
|
||||||
|
<span>Workers</span>
|
||||||
|
<span>Cloudflare</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user