fix: zoom image with actual size #44
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Check for 'skip ci' in commit messages | |
run: | | |
if [[ "${{ github.event.head_commit.message }}" == *"[skip-ci]"* && "${{ github.actor }}" == "tszhong0411" ]]; then | |
echo "CI checks are skipped as requested." | |
exit 0 | |
fi | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install | |
- name: Typecheck | |
run: bun run type-check | |
- name: Lint | |
run: bun run lint | |
- name: Test | |
run: bun run test -- --coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
deploy-preview: | |
name: Deploy preview | |
runs-on: ubuntu-latest | |
needs: ci | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install Vercel CLI | |
run: bun add -g vercel | |
- name: Install dependencies | |
run: bun install | |
- name: Build Project | |
run: bun run build | |
- name: Deploy Project to Vercel | |
uses: amondnet/vercel-action@v25 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
working-directory: ./ | |
deploy-production: | |
name: Deploy production | |
runs-on: ubuntu-latest | |
needs: ci | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip deploy]') | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Install Vercel CLI | |
run: bun add -g vercel | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |