Publish #14
Workflow file for this run
This file contains 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 | |
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 '/*' | |