Skip to content

Publish Hub

Publish Hub #4360

Workflow file for this run

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 "/*"