docs: ✏️ update #727
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 docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.21.1" | |
| cache: "pnpm" | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.PROD_AWS_REGION }} | |
| - name: Install packages | |
| run: pnpm install | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Build docs | |
| run: pnpm build:docs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOC_APP_ID: ${{ secrets.DOC_APP_ID }} | |
| DOC_API_KEY: ${{ secrets.DOC_API_KEY }} | |
| DOC_INDEX_NAME: ${{ secrets.DOC_INDEX_NAME }} | |
| DOC_ASSISTANT_ID: ${{ secrets.DOC_ASSISTANT_ID }} | |
| - name: Deploy to S3 bucket | |
| run: aws s3 sync ./documentation/build/ s3://${{ secrets.PROD_AWS_S3 }} --delete | |
| - name: Clear cache after deploy | |
| run: aws cloudfront create-invalidation --distribution-id=${{ secrets.PROD_AWS_CLOUDFRONT_ID }} --paths "/*" |