mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
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 <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user