workflow run on main #1
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: Deploy to AWS (release) | |
on: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
buildkitd-flags: --debug | |
- name: install packages | |
run: npm install . | |
- name: Build | |
run: DOCKER=docker DOCKER_TMPDIR=/tmp make all | |
- name: Set version | |
run: "echo -n 'export const version = {ref: ${{ toJSON(github.ref) }}, ref_type: ${{ toJSON(github.ref_type) }}, sha: ${{ toJSON(github.sha) }} };' > public/app/version.js" | |
- name: Create Hashes | |
run: python generate-importmap.py | |
- name: Set AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Deploy | |
run: aws s3 sync --delete --exclude=beta/\* --content-encoding utf8 dist s3://videtect.claude-apps.com/website/ |