Re-add temporary push trigger #2
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: docs-generator | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: 'Number of PR to document' | |
| required: true | |
| type: string | |
| push: | |
| jobs: | |
| generate_docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| AMAZON_Q_SIGV4: 1 | |
| CHAT_DOWNLOAD_ROLE_ARN: ${{ secrets.CHAT_DOWNLOAD_ROLE_ARN }} | |
| CHAT_BUILD_BUCKET_NAME: ${{ secrets.CHAT_BUILD_BUCKET_NAME }} | |
| PR_FILE: "pr-contents.txt" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GIT_HASH: "latest" | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_TB_ROLE }} | |
| aws-region: us-east-1 | |
| - name: Run setup_amazon_q.sh from terminal-bench | |
| run: | | |
| cd terminal-bench-test | |
| chmod +x setup_amazon_q.sh | |
| bash setup_amazon_q.sh | |
| - name: Make scripts executable | |
| run: | | |
| chmod +x docs-generation/create-docs-pr.sh | |
| chmod +x docs-generation/read-pr.sh | |
| chmod +x docs-generation/update-docs.sh | |
| - name: Generate PR contents file | |
| run: bash docs-generation/read-pr.sh ${{ inputs.pr_number }} | |
| - name: Update docs | |
| run: bash docs-generation/update-docs.sh | |
| - name: Create PR | |
| if: success() | |
| run: bash docs-generation/create-docs-pr.sh ${{ inputs.pr_number }} | |