Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: production
run-name: 'Deploy ${{ github.ref_name }}'
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- 'release'
tags:
- 'v*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to make it something avyweb-v?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tags are already scoped to the repo, so there's no risk of collision with other projects. v* is the standard semver convention (e.g., used by GitHub's own "Generate release notes" feature and most actions like actions/checkout@v4).

# Allow manual triggering
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -37,6 +38,15 @@ jobs:
TURSO_API_TOKEN: ${{ secrets.TURSO_API_TOKEN }}
- name: 🏗 Setup repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify release branch is up to date
run: |
git fetch origin release
if [ "$(git rev-parse HEAD)" != "$(git rev-parse origin/release)" ]; then
echo "::error::Tag commit doesn't match release branch. Did you forget 'git push origin'?"
exit 1
fi
- name: 🏗 Setup pnpm
uses: pnpm/action-setup@v4
- name: 🏗 Setup Node
Expand Down Expand Up @@ -77,25 +87,25 @@ jobs:
set -o pipefail

fullName="${{ github.repository }}"
author="${{ github.event.pusher.name || github.actor }}"
vercel deploy --yes --prebuilt --target=production \
--meta='githubCommitAuthorName=${{ github.event.pusher.name }}' \
--meta="githubCommitAuthorName=${author}" \
--meta='githubCommitOrg=${{ github.repository_owner }}' \
--meta='githubCommitRef=release' \
--meta="githubCommitRepo=${fullName##*/}" \
--meta='githubCommitSha=${{ github.sha }}' \
--meta='githubDeployment=1' \
--meta='githubOrg=${{ github.repository_owner }}' \
--meta="githubRepo=${fullName##*/}" \
--meta='githubCommitAuthorLogin=${{ github.event.pusher.name }}' \
--meta="githubCommitAuthorLogin=${author}" \
--token=${{ secrets.VERCEL_TOKEN }}
- name: Remove old Vercel deployments (keep latest 2)
run: |
set -o errexit
set -o nounset
set -o pipefail

ref="${{ github.event.ref }}"
branch="${ref##refs/heads/}"
branch="release"

echo "Cleaning up deployments and aliases for branch: $branch"

Expand Down
4 changes: 4 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ When triggered via GitHub Issues (with `@claude` mention):
3. Follow existing code patterns and styles in the codebase
4. Run `pnpm prettify`, `pnpm tsc`, and `pnpm lint` before committing

### Pull Request Descriptions

When asked to write a PR description, follow the template in `.github/PULL_REQUEST_TEMPLATE.md` and return the description in markdown.

### Creating the PR

1. Write a clear PR title summarizing the change
Expand Down
Loading