Compare commits
8 Commits
0d10f383ec
...
b2747f1959
| Author | SHA1 | Date | |
|---|---|---|---|
| b2747f1959 | |||
|
|
246e9c2667 | ||
|
|
bf2c93a084 | ||
|
|
e6d69f59e8 | ||
|
|
038c42dff7 | ||
|
|
61f65d6df0 | ||
|
|
f5fd35d12e | ||
|
|
e8bb42c1b6 |
@@ -27,6 +27,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
REGISTRY_HOST: git.dwal.in
|
||||||
|
IMAGE_NAME: zola-pwsh-s3
|
||||||
TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }}
|
TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }}
|
||||||
SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }}
|
SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }}
|
||||||
S3_ENDPOINT: ${{ vars.S3_ENDPOINT }}
|
S3_ENDPOINT: ${{ vars.S3_ENDPOINT }}
|
||||||
@@ -38,7 +40,7 @@ jobs:
|
|||||||
# Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed
|
# Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed
|
||||||
# Built by build-container.yaml workflow from integrations/gitea/Dockerfile
|
# Built by build-container.yaml workflow from integrations/gitea/Dockerfile
|
||||||
container:
|
container:
|
||||||
image: ${{ gitea.server_url }}/${{ gitea.repository }}/zola-pwsh-s3:latest
|
image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest
|
||||||
credentials:
|
credentials:
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.CONTAINER_TOKEN }}
|
password: ${{ secrets.CONTAINER_TOKEN }}
|
||||||
@@ -85,13 +87,18 @@ jobs:
|
|||||||
[default]
|
[default]
|
||||||
region = garage
|
region = garage
|
||||||
output = json
|
output = json
|
||||||
|
s3 =
|
||||||
|
max_concurrent_requests = 20
|
||||||
|
max_queue_size = 10000
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Upload to S3 (Garage)
|
- name: Upload to S3 (Garage)
|
||||||
run: |
|
run: |
|
||||||
echo "Uploading to s3://$S3_BUCKET"
|
echo "Uploading to s3://$S3_BUCKET with parallel transfers"
|
||||||
aws s3 sync ./template/public/ "s3://$S3_BUCKET/" \
|
aws s3 sync ./template/public/ "s3://$S3_BUCKET/" \
|
||||||
--endpoint-url "https://$S3_ENDPOINT" \
|
--endpoint-url "https://$S3_ENDPOINT" \
|
||||||
--acl public-read \
|
--acl public-read \
|
||||||
--delete
|
--exclude "media/*" \
|
||||||
|
--delete \
|
||||||
|
--quiet
|
||||||
echo "Upload complete"
|
echo "Upload complete"
|
||||||
|
|||||||
@@ -15,18 +15,20 @@ FROM mcr.microsoft.com/powershell:lts-alpine-3.20
|
|||||||
# Copy Zola from builder
|
# Copy Zola from builder
|
||||||
COPY --from=builder /usr/local/bin/zola /usr/local/bin/zola
|
COPY --from=builder /usr/local/bin/zola /usr/local/bin/zola
|
||||||
|
|
||||||
# Install minimal dependencies: git, aws-cli (for S3), ca-certificates
|
# Install minimal dependencies: git, aws-cli (for S3), ca-certificates, nodejs (for GitHub Actions)
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
git \
|
git \
|
||||||
aws-cli \
|
aws-cli \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
nodejs \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Verify installations
|
# Verify installations
|
||||||
RUN pwsh -Version \
|
RUN pwsh -Version \
|
||||||
&& zola --version \
|
&& zola --version \
|
||||||
&& aws --version \
|
&& aws --version \
|
||||||
&& git --version
|
&& git --version \
|
||||||
|
&& node --version
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user