Skip to content

Update file(s) "/." from "groupdocs-conversion/Groupdocs.Conversion-R… #45

Update file(s) "/." from "groupdocs-conversion/Groupdocs.Conversion-R…

Update file(s) "/." from "groupdocs-conversion/Groupdocs.Conversion-R… #45

name: Refresh Root Aggregates
# Lightweight: rebuild the bucket-root aggregates from product SOURCE — no Hugo build:
# /search-index.json (the 404 live search source) and /llms-full.txt (the combined, compacted
# whole-reference file). Runs on any content push so both stay current between full Deploy All
# runs. Branch mapping: production -> production, main -> staging.
on:
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: true
default: production
type: choice
options:
- staging
- production
push:
branches: [ production, main ]
paths:
- 'content/sites/groupdocs/**'
# Coalesce bursts of content pushes; the latest content state is what we want indexed.
concurrency:
group: search-index-${{ github.ref_name }}
cancel-in-progress: true
jobs:
refresh:
runs-on: ubuntu-latest
env:
ENVIRONMENT: ${{ github.event_name == 'workflow_dispatch' && inputs.environment || (github.ref_name == 'production' && 'production' || 'staging') }}
steps:
- uses: actions/checkout@v4
- name: Build search-index.json from source
run: python3 build_search_index.py --source content/sites/groupdocs --out search-index.json
- name: Deploy search-index.json to bucket root
run: |
BUCKET=${{ env.ENVIRONMENT == 'production' && 'reference.groupdocs.com' || 'reference2.groupdocs.com' }}
aws s3 cp search-index.json "s3://$BUCKET/search-index.json" \
--content-type "application/json; charset=utf-8" --region us-west-2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
- name: Build llms-full.txt from source
run: |
BASE=${{ env.ENVIRONMENT == 'production' && 'https://reference.groupdocs.com' || 'https://reference2.groupdocs.com' }}
python3 build_llms_full.py --source content/sites/groupdocs --base-url "$BASE" --out llms-full.txt
- name: Deploy llms-full.txt to bucket root
run: |
BUCKET=${{ env.ENVIRONMENT == 'production' && 'reference.groupdocs.com' || 'reference2.groupdocs.com' }}
aws s3 cp llms-full.txt "s3://$BUCKET/llms-full.txt" \
--content-type "text/plain; charset=utf-8" --region us-west-2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ env.ENVIRONMENT == 'production' && secrets.AWS_DISTRIBUTION_PROD || secrets.AWS_DISTRIBUTION }}
PATHS: '/search-index.json /llms-full.txt'
AWS_REGION: 'us-west-2'
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }}