Skip to content

Publish

Publish #14

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup mise
uses: jdx/mise-action@v2
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_KEY }}
aws-region: us-east-1
- name: Build Packages
run: pnpm build
- name: Build Site
timeout-minutes: 60
working-directory: site
run: /usr/bin/time --verbose pnpm build
- name: Sync bucket
run: |
cd ./site/dist
aws s3 sync . s3://api2static.teamlab.info --delete
- name: Invalidate CLOUDFRONT cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths '/*'