ci: deploy-docs → S3 docs.tinqs.com + CloudFront invalidation
Build & Deploy Docs / deploy (push) Failing after 4s
Build & Deploy Docs / deploy (push) Failing after 4s
S3 bucket: docs.tinqs.com (static website hosting) CloudFront: E14Z6XLZHNNAM6 (*.tinqs.com ACM cert) Route 53: docs.tinqs.com CNAME → d1ofpjs3qvea2q.cloudfront.net Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,9 +6,12 @@ on:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'templates/tstudio/**'
|
||||
- 'SETUP.md'
|
||||
- '.gitea/workflows/deploy-docs.yml'
|
||||
|
||||
env:
|
||||
S3_BUCKET: docs.tinqs.com
|
||||
CF_DISTRIBUTION: E14Z6XLZHNNAM6
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: host
|
||||
@@ -19,20 +22,22 @@ jobs:
|
||||
node-version: '22'
|
||||
- run: npm install -g pnpm
|
||||
|
||||
- name: Build Docusaurus site
|
||||
- name: Build Docusaurus
|
||||
working-directory: docs
|
||||
run: |
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
echo "Docusaurus build complete"
|
||||
|
||||
- name: Deploy to S3
|
||||
run: |
|
||||
S3_BUCKET="s3://tinqs-cli-releases/docs-site"
|
||||
|
||||
aws s3 sync docs/build/ "$S3_BUCKET/" \
|
||||
aws s3 sync docs/build/ "s3://$S3_BUCKET/" \
|
||||
--region eu-west-1 \
|
||||
--delete \
|
||||
--cache-control "public, max-age=300"
|
||||
|
||||
- name: Invalidate CloudFront
|
||||
run: |
|
||||
aws cloudfront create-invalidation \
|
||||
--distribution-id "$CF_DISTRIBUTION" \
|
||||
--paths "/*"
|
||||
echo "docs.tinqs.com deployed"
|
||||
|
||||
Reference in New Issue
Block a user