Avoid triggering read cloud re-render by not snapshotting entire view… #984
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: Upload website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build and upload website to production | |
| runs-on: ubuntu-latest | |
| if: | |
| ${{ contains(github.event.head_commit.message, 'update docs') || | |
| contains(github.event.head_commit.message, '[update docs only]') }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-2 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: website | |
| - name: Build website | |
| run: pnpm build | |
| working-directory: website | |
| - name: Upload to S3 and invalidate CloudFront cache | |
| run: | | |
| aws s3 sync --delete build s3://jbrowse.org/jb2/ | |
| aws cloudfront create-invalidation --distribution-id E13LGELJOT4GQO --paths "/jb2/*" | |
| working-directory: website |