From 9a34857df93e837ba97a78acc816eaa38f733bc0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 18 Aug 2026 06:05:26 +0000 Subject: [PATCH] Remove AWS S3/CloudFront deployment from the publish workflow (#518) The docs site is served by Cloudflare Pages now, so the AWS deployment path is redundant. - Drop the AWS CLI installation step. - Drop the `configure-aws-credentials` step and the `aws s3 sync` + CloudFront invalidation step. - Keep only the Cloudflare Pages deploy, and simplify the `_headers` / `_redirects` comment since it no longer needs to explain S3 ordering. The AWS_* secrets are no longer used by this workflow and can be removed from the repository settings. Reviewed-on: https://gitea.com/gitea/docs/pulls/518 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> --- .gitea/workflows/build-and-publish.yaml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 5b1578c5..49fc32cb 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -23,11 +23,6 @@ jobs: with: node-version: 24 cache: pnpm - - name: install necessary tools - run: | - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - name: prepare awesome list run: | make prepare-awesome-latest prepare-awesome\#27 prepare-awesome\#26 prepare-awesome\#25 prepare-awesome\#24 prepare-awesome\#23 prepare-awesome\#22 @@ -37,16 +32,6 @@ jobs: - name: build site run: make build - - name: aws credential configure - uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6 - with: - aws-access-key-id: ${{ secrets.AWS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} - aws-region: ${{ secrets.AWS_REGION}} - - name: Copy files to the production website with the AWS CLI - run: | - aws s3 sync sites/docs/dist/ s3://docs-gitea-com - aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION}} --paths '/*' - name: Copy files to Cloudflare Pages env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} @@ -54,9 +39,7 @@ jobs: run: | # cloudflare/_headers and cloudflare/_redirects are only meaningful for # the Cloudflare Pages deployment, so they are copied into the build - # here, after the S3 sync above has run. If they were placed in the - # build any earlier, that sync would publish them to S3/CloudFront and - # make them publicly readable there. + # right before the deploy. cp cloudflare/_headers sites/docs/dist/_headers cp cloudflare/_redirects sites/docs/dist/_redirects test -f sites/docs/dist/_headers -a -f sites/docs/dist/_redirects || exit 1