Files
docs/.gitea/workflows/build-and-publish.yaml
Lunny Xiao 9a34857df9 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]>
2026-08-18 06:05:26 +00:00

49 lines
1.9 KiB
YAML

name: Build and Publish Docs site
run-name: astro build docs site
on:
push:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-24.04
env:
NODE_OPTIONS: --max-old-space-size=8192
# search only appears once the credentials are set, the build falls back
# to pagefind otherwise
PUBLIC_DOCSEARCH_APP_ID: ${{ secrets.DOCSEARCH_APP_ID }}
PUBLIC_DOCSEARCH_API_KEY: ${{ secrets.DOCSEARCH_API_KEY }}
PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 24
cache: pnpm
- 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
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: build site
run: make build
- name: Copy files to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
# cloudflare/_headers and cloudflare/_redirects are only meaningful for
# the Cloudflare Pages deployment, so they are copied into the build
# 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
pnpm dlx wrangler@4 pages deploy sites/docs/dist \
--project-name docs-gitea-com \
--branch main