Merge pull request 'fix-create-site-workflow' (#2) from fix-create-site-workflow into main
All checks were successful
Build and Deploy Site / build-and-deploy (push) Successful in 2m13s
Build Container Image / build-container (push) Successful in 16s

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-01-19 22:00:14 +03:00
2 changed files with 14 additions and 5 deletions

View File

@@ -27,6 +27,8 @@ on:
workflow_dispatch:
env:
REGISTRY_HOST: git.dwal.in
IMAGE_NAME: zola-pwsh-s3
TEMPLATES_REPO_URL: ${{ vars.TEMPLATES_REPO_URL }}
SCRIPTS_REPO_URL: ${{ vars.SCRIPTS_REPO_URL }}
S3_ENDPOINT: ${{ vars.S3_ENDPOINT }}
@@ -38,7 +40,7 @@ jobs:
# Use custom container with PowerShell, Zola, AWS CLI, Git pre-installed
# Built by build-container.yaml workflow from integrations/gitea/Dockerfile
container:
image: ${{ gitea.server_url }}/${{ gitea.repository }}/zola-pwsh-s3:latest
image: ${{ env.REGISTRY_HOST }}/${{ gitea.repository }}/${{ env.IMAGE_NAME }}:latest
credentials:
username: ${{ gitea.actor }}
password: ${{ secrets.CONTAINER_TOKEN }}
@@ -85,13 +87,18 @@ jobs:
[default]
region = garage
output = json
s3 =
max_concurrent_requests = 20
max_queue_size = 10000
EOF
- name: Upload to S3 (Garage)
run: |
echo "Uploading to s3://$S3_BUCKET"
echo "Uploading to s3://$S3_BUCKET with parallel transfers"
aws s3 sync ./template/public/ "s3://$S3_BUCKET/" \
--endpoint-url "https://$S3_ENDPOINT" \
--acl public-read \
--delete
--exclude "media/*" \
--delete \
--quiet
echo "Upload complete"

View File

@@ -15,18 +15,20 @@ FROM mcr.microsoft.com/powershell:lts-alpine-3.20
# Copy Zola from builder
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 \
git \
aws-cli \
ca-certificates \
nodejs \
&& rm -rf /var/cache/apk/*
# Verify installations
RUN pwsh -Version \
&& zola --version \
&& aws --version \
&& git --version
&& git --version \
&& node --version
WORKDIR /workspace