Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
65e09c4
chore: environment and wallet configuration
2dpetkov Mar 13, 2024
dff1fc6
feat: dynamic SEO and sitemap
pswies Apr 16, 2024
667eadb
feat: add DOS build script
pswies Aug 6, 2024
1a02453
ci: add env.json validation workflow
rudimocnik Jan 16, 2026
ccaebbf
ci: add Vercel deployer workflow
rudimocnik Jan 16, 2026
49cb083
chore: remove unused deploy workflows
rudimocnik Jan 16, 2026
5d0661a
feat: add Vercel caching headers
rudimocnik Oct 21, 2025
d26092b
legal: add terms of service and privacy policy
rudimocnik Dec 12, 2025
f17c541
chore: update documentation links
rudimocnik Dec 23, 2025
181e78e
chore: remove squid config param
rudimocnik Jan 16, 2026
9adea36
ci: parameterize github user
rudimocnik Jan 16, 2026
9a32352
feat: intercom config
rudimocnik Jan 17, 2026
01a7123
feat: Introduce terraform workspace with a test datadog monitor
pswies Jan 21, 2026
177eb8f
temporarily disable auto-deployments
2dpetkov Jan 30, 2026
2da90bc
re-enable autodeployments
2dpetkov Feb 17, 2026
0c576f3
Terms of Use: add Communication Features section
2dpetkov Mar 13, 2026
0406733
update solanaRpcUrl with generic Alchemy proxy
2dpetkov Apr 28, 2026
85b011a
chore: add Datadog RUM SDK dependencies
rudimocnik May 29, 2026
1be904f
feat: initialize Datadog RUM (collection only)
rudimocnik May 29, 2026
c3ab4af
feat: forward errors to Datadog RUM with React error tracking
rudimocnik May 29, 2026
11ca28e
feat: enable Datadog RUM Session Replay (masked, sample rate via env)
rudimocnik May 29, 2026
8fcc8ec
feat: forward Statsig feature flags to Datadog RUM
rudimocnik May 29, 2026
9edea92
feat: attach user identity and context to Datadog RUM
rudimocnik May 29, 2026
07ca463
chore: adjust dd rum
rudimocnik Jun 1, 2026
e92ca75
Revert "chore: adjust dd rum"
rudimocnik Jul 1, 2026
0299bb3
Revert "feat: attach user identity and context to Datadog RUM"
rudimocnik Jul 1, 2026
6ff33fe
Revert "feat: forward Statsig feature flags to Datadog RUM"
rudimocnik Jul 1, 2026
72d186c
Revert "feat: enable Datadog RUM Session Replay (masked, sample rate …
rudimocnik Jul 1, 2026
27fcce9
Revert "feat: forward errors to Datadog RUM with React error tracking"
rudimocnik Jul 1, 2026
80b060e
Revert "feat: initialize Datadog RUM (collection only)"
rudimocnik Jul 1, 2026
2732b6e
Revert "chore: add Datadog RUM SDK dependencies"
rudimocnik Jul 1, 2026
7354676
chore(spot): remove spot
rudimocnik Jul 31, 2026
a14db16
fix: replace dead Chaos Labs leaderboard URL
rudimocnik Sep 16, 2026
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
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/deploy-staging.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/deploy-testnet.yml

This file was deleted.

256 changes: 256 additions & 0 deletions .github/workflows/deployer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
name: Deploy new upstream release to Vercel

on:
workflow_dispatch:
repository_dispatch:
types: [deploy-upstream]

jobs:
# ========================================
# JOB 1: Fetch Versions
# ========================================
fetch-versions:
runs-on: ubuntu-latest
outputs:
latest-version: ${{ steps.upstream.outputs.latest-version }}
latest-tag: ${{ steps.upstream.outputs.latest-tag }}
production-version: ${{ steps.production.outputs.production-version }}
production-tag: ${{ steps.production.outputs.production-tag }}
latest-patch-in-line-version: ${{ steps.patch-in-line.outputs.latest-patch-in-line-version }}
latest-patch-in-line-tag: ${{ steps.patch-in-line.outputs.latest-patch-in-line-tag }}

steps:
- name: Log trigger information
run: |
echo "Workflow triggered by: ${{ github.event_name }}"
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
echo "Event type: ${{ github.event.action }}"
echo "Client payload: ${{ toJson(github.event.client_payload) }}"
fi

- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0 # Fetch full history

- name: Configure Git with GitHub App
run: |
git config --global user.name "dos-automation-bot[bot]"
git config --global user.email "dos-automation-bot@users.noreply.github.com"

- name: Identify the latest upstream version
id: upstream
run: |
# Add upstream remote using HTTPS with token
git remote add upstream https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/dydxprotocol/v4-web.git

# Update origin to use HTTPS with token
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/dydxopsdao/v4-web.git

# Fetch all tags from upstream
git fetch upstream

# Get the latest release tag
LATEST_TAG=$(git tag -l 'release/v*' | sort -V | tail -n 1)
echo "Latest upstream tag found: ${LATEST_TAG}"

# Check if LATEST_TAG is empty
if [ -z "$LATEST_TAG" ]; then
echo "No tags found matching 'release/v*'."
exit 1
fi

# Export to outputs
echo "latest-tag=${LATEST_TAG}" >> $GITHUB_OUTPUT
echo "latest-version=${LATEST_TAG#release/v}" >> $GITHUB_OUTPUT

- name: Identify the latest production version
id: production
run: |
# Fetch all tags from the main branch
git fetch origin main --tags

# Get the latest tag on the main branch
PRODUCTION_TAG=$(git tag --merged origin/main | sort -V | tail -n 1)
echo "Latest production tag on main branch: ${PRODUCTION_TAG}"

# Check if PRODUCTION_TAG is empty
if [ -z "$PRODUCTION_TAG" ]; then
echo "No production tags found on main branch."
exit 1
fi

# Export to outputs
echo "production-tag=${PRODUCTION_TAG}" >> $GITHUB_OUTPUT
echo "production-version=${PRODUCTION_TAG#release/v}" >> $GITHUB_OUTPUT

- name: Identify the latest patch in production version line
id: patch-in-line
run: |
# Get the production version to extract major.minor
PRODUCTION_VERSION="${{ steps.production.outputs.production-version }}"
IFS='.' read -r PROD_MAJOR PROD_MINOR PROD_PATCH <<< "$PRODUCTION_VERSION"

echo "Production version: $PRODUCTION_VERSION (Major: $PROD_MAJOR, Minor: $PROD_MINOR, Patch: $PROD_PATCH)"
echo "Looking for latest patch in upstream version line: $PROD_MAJOR.$PROD_MINOR.x"

# Find the latest tag in the same major.minor version line from upstream
LATEST_PATCH_IN_LINE_TAG=$(git tag -l "release/v$PROD_MAJOR.$PROD_MINOR.*" | sort -V | tail -n 1)

if [ -z "$LATEST_PATCH_IN_LINE_TAG" ]; then
echo "No upstream tags found for version line $PROD_MAJOR.$PROD_MINOR.x"
echo "Using production version as fallback"
echo "latest-patch-in-line-tag=${{ steps.production.outputs.production-tag }}" >> $GITHUB_OUTPUT
echo "latest-patch-in-line-version=$PRODUCTION_VERSION" >> $GITHUB_OUTPUT
else
LATEST_PATCH_IN_LINE_VERSION="${LATEST_PATCH_IN_LINE_TAG#release/v}"
echo "Latest patch in upstream version line: $LATEST_PATCH_IN_LINE_TAG ($LATEST_PATCH_IN_LINE_VERSION)"

# Export to outputs
echo "latest-patch-in-line-tag=${LATEST_PATCH_IN_LINE_TAG}" >> $GITHUB_OUTPUT
echo "latest-patch-in-line-version=${LATEST_PATCH_IN_LINE_VERSION}" >> $GITHUB_OUTPUT
fi

# ========================================
# JOB 2: Determine If Deployment Is Needed
# ========================================
determine-if-deployment-needed:
runs-on: ubuntu-latest
needs: fetch-versions
outputs:
new-patch-version: ${{ steps.version-check.outputs.new-patch-version }}

steps:
- name: Determine version type
id: version-check
run: |
echo "Checking if the version is a patch, minor, or major"

# Extract version numbers from outputs
IFS='.' read -r PROD_MAJOR PROD_MINOR PROD_PATCH <<< "${{ needs.fetch-versions.outputs.production-version }}"
IFS='.' read -r UPSTREAM_MAJOR UPSTREAM_MINOR UPSTREAM_PATCH <<< "${{ needs.fetch-versions.outputs.latest-version }}"
IFS='.' read -r PATCH_LINE_MAJOR PATCH_LINE_MINOR PATCH_LINE_PATCH <<< "${{ needs.fetch-versions.outputs.latest-patch-in-line-version }}"

# Log the extracted version numbers
echo "Production Version - Major: $PROD_MAJOR, Minor: $PROD_MINOR, Patch: $PROD_PATCH"
echo "Latest Patch in Line - Major: $PATCH_LINE_MAJOR, Minor: $PATCH_LINE_MINOR, Patch: $PATCH_LINE_PATCH"
echo "Latest Version - Major: $UPSTREAM_MAJOR, Minor: $UPSTREAM_MINOR, Patch: $UPSTREAM_PATCH"

# Determine if a new patch version is detected within the same major.minor line
if [ "$PATCH_LINE_MAJOR" -eq "$PROD_MAJOR" ] && [ "$PATCH_LINE_MINOR" -eq "$PROD_MINOR" ] && [ "$PATCH_LINE_PATCH" -gt "$PROD_PATCH" ]; then
echo "New patch version detected: ${{ needs.fetch-versions.outputs.latest-patch-in-line-tag }}"
echo "new-patch-version=true" >> $GITHUB_OUTPUT
else
echo "No new patch version detected."
echo "new-patch-version=false" >> $GITHUB_OUTPUT
exit 0
fi

# ========================================
# JOB 3: Deploy
# ========================================
deploy:
runs-on: ubuntu-latest
needs: [fetch-versions, determine-if-deployment-needed]
if: needs.determine-if-deployment-needed.outputs.new-patch-version == 'true'

steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0 # Fetch full history

- name: Configure Git with GitHub App and GPG signing
run: |
# Note: This uses a service account (not the GitHub App above) because
# GPG-signed commits require a real user identity with a matching GPG key.
# The GitHub App is used for non-write operations.
git config --global user.name "${{ vars.GIT_USER_NAME }}"
git config --global user.email "${{ vars.GIT_USER_EMAIL }}"

# Configure GPG for non-interactive use
mkdir -p ~/.gnupg
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf

# Import GPG key and configure signing
echo "${{ secrets.BOT_GPG_PRIVATE_KEY }}" | gpg --batch --yes --import
git config --global user.signingkey $(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2)
git config --global commit.gpgsign true

- name: Setup git remotes
run: |
# Add upstream remote using HTTPS with token
git remote add upstream https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/dydxprotocol/v4-web.git

# Update origin to use HTTPS with token
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/dydxopsdao/v4-web.git

# Fetch all tags from upstream to ensure they are available locally
git fetch upstream --tags

- name: Create a new release branch for Vercel deployment
run: |
# Create a new branch from the latest release tag
git checkout -b dos-${{ needs.fetch-versions.outputs.latest-patch-in-line-version }} origin/main

# Rebase commits from the latest release tag onto the new release branch
git pull --rebase upstream ${{ needs.fetch-versions.outputs.latest-patch-in-line-tag }}

# Push the release branch to the remote repository
git push --set-upstream origin dos-${{ needs.fetch-versions.outputs.latest-patch-in-line-version }}

- name: Reset main to the feature branch for production deployment and push all changes
run: |
# Checkout the main branch
git checkout main

# Hard reset the main branch to the feature branch
git reset --hard origin/dos-${{ needs.fetch-versions.outputs.latest-patch-in-line-version }}

# Force push the changes to the main branch
sleep 1
git push --force origin main
# ========================================
# JOB 4: Notify Failure
# ========================================
notify-failure:
runs-on: ubuntu-latest
needs: [fetch-versions, determine-if-deployment-needed, deploy]
if: failure() || cancelled()
steps:
- name: Send failure notice to deploymentPromoted bot
env:
BOT_ENDPOINT: ${{ vars.DEPLOYMENT_PROMOTED_URL }}
PROJECT_NAME: v4-web
LATEST_PATCH: ${{ needs.fetch-versions.outputs.latest-patch-in-line-version }}
PRODUCTION_VERSION: ${{ needs.fetch-versions.outputs.production-version }}
run: |
VERSION_PAYLOAD="$LATEST_PATCH"
if [ -z "$VERSION_PAYLOAD" ]; then
VERSION_PAYLOAD="$PRODUCTION_VERSION"
fi

curl -X POST "$BOT_ENDPOINT" \
-H "Content-Type: application/json" \
-d "$(jq -n \
--arg project "$PROJECT_NAME" \
--arg status "failed" \
--arg version "$VERSION_PAYLOAD" \
--arg workflow_run "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
'{project: $project, status: $status, version: $version, meta: {workflow_run: $workflow_run}}')"
Loading
Loading