Add LLMs.txt to Strapi v3 docs (#2725) #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Legacy v3 version | |
| on: | |
| push: | |
| branches: | |
| - v3 | |
| jobs: | |
| deploy-v3: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Need to get actual deployment URL and not previous one | |
| - name: Get Vercel deployment URL | |
| id: get-url-v3 | |
| uses: derrickmehaffy/vercel-preview-url@main | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| with: | |
| vercel_team_id: 'strapijs' | |
| vercel_target: 'preview' | |
| vercel_app: 'documentation' | |
| vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| # Waits for Vercel to finish building the docs | |
| - name: Wait for Vercel deploy to complete | |
| uses: UnlyEd/[email protected] | |
| id: await-vercel-v3 | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| with: | |
| deployment-url: ${{ steps.get-url-v3.outputs.preview_url }} | |
| timeout: 300 # wait 5 minutes before failing | |
| # Outputs the current URL and confirms ready status (for debugging purposes) | |
| - name: Output Vercel debug status | |
| run: "echo The deployment at ${{ fromJson(steps.await-vercel-v3.outputs.deploymentDetails).url }} is ${{ fromJson(steps.await-vercel-v3.outputs.deploymentDetails).readyState }}" | |
| # Clears Cloudfront cache | |
| - name: Invalidate CloudFront Cache | |
| uses: chetan/invalidate-cloudfront-action@v2 | |
| id: invalid-cloudfront-v3 | |
| env: | |
| DISTRIBUTION: ${{ secrets.LEGACY_V3_DISTRIBUTION }} | |
| PATHS: "/*" | |
| AWS_REGION: ${{ secrets.LEGACY_V3_REGION }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| # Gets the Algolia Config | |
| - name: Get docsearch config and parse into a variable | |
| id: get-algolia-config-v3 | |
| run: echo "::set-output name=config::$(curl -s https://raw.githubusercontent.com/strapi/documentation/v3/.algolia/docsearch.config.json | jq -r tostring)" | |
| # Outputs parsed Algolia Config (for debugging purposes) | |
| - name: Output Algolia debug status | |
| run: "echo ${{ steps.get-algolia-config-v3.outputs.config }}" | |
| # Updates the Algolia Search indexes | |
| - name: Invalidate Algolia Search Cache | |
| uses: signcl/docsearch-scraper-action@master | |
| id: update-algolia-index-v3 | |
| env: | |
| APPLICATION_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
| API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
| CONFIG: ${{ steps.get-algolia-config-v3.outputs.config }} |