Merge pull request #3949 from nsoranzo/restrict_gtn-import_gh_wf_to_o… #4358
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: Publish Hub | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "30 23 * * *" | |
| concurrency: | |
| group: publish-${{ github.ref_name }} | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'galaxyproject' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: cd astro && npm ci | |
| - name: Build Astro site | |
| run: cd astro && npm run build | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| 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: Sync to preview S3 | |
| run: aws s3 sync astro/dist/ s3://astro-hub/ --delete | |
| - name: Set S3 redirect metadata | |
| run: S3_BUCKET=astro-hub node deploy/set-s3-redirects.mjs | |
| - name: Invalidate CloudFront cache | |
| run: aws cloudfront create-invalidation --distribution-id ${{ secrets.ASTRO_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*" |