Bump aws-actions/configure-aws-credentials in the actions-all group (… #336
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: Build | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| tags: | |
| - v*.*.* | |
| pull_request: | |
| branches: | |
| - 'main' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| if: (success() && github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0 | |
| with: | |
| role-to-assume: 'arn:aws:iam::135184807345:role/GitHubAction-DocsRelease' | |
| aws-region: eu-west-1 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| - name: Invalidate cloudfront cache | |
| run: aws cloudfront create-invalidation --distribution-id E2GXEODIKKZ5LV --paths "/docs/*" "/docs/" "/docs" |