Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a474f19
Update Privacy Policy and Terms of Use
pswies Feb 12, 2024
e957df2
update android deep link
2dpetkov Mar 13, 2024
d2522fe
Set up SEO via page-specific HTML tags
pswies Apr 12, 2024
1a33c6b
Parametrize HTML meta tag "robots"
pswies Apr 16, 2024
9655cd5
add public/sitemap.xml
2dpetkov May 9, 2024
7b9da02
add temp INTERCOM_API_BASE variable for intercom migration
rudimocnik May 13, 2024
7054ccc
Update banner
pswies Jul 23, 2024
b7f5940
Use new URLs for Skip and Apybara API proxies in mainnet
rudimocnik Oct 19, 2024
1c7424e
Add DOS-specific build script
pswies Aug 6, 2024
63b3f4a
Set up Google Tag Manager
pswies Aug 6, 2024
67af98b
remove feedback URL for mainnet
rudimocnik Sep 3, 2024
4d4c804
fix: enable CCTPWithdrawalOnly for mainnet
rudimocnik Sep 16, 2024
2924d61
Remove static sitemap.xml
pswies Sep 20, 2024
0b18c26
Configure dynamic sitemap generation
pswies Sep 20, 2024
c53c19c
Remove static subdomain URLs from sitemap
pswies Sep 23, 2024
dcc822f
chore: update sol and skip proxies
rudimocnik Sep 24, 2024
21b3e34
Use dedicated Noble RPC from Polkachu
pswies Sep 27, 2024
072a957
Force-update mobile apps to use EU Amplitude account
pswies Nov 5, 2024
7d5dc3d
Update Terms of Use
rudimocnik Nov 19, 2024
78869c6
set feedback form
rudimocnik Nov 19, 2024
263999e
test: add json tester
ben-dydx-ops Nov 28, 2024
55f2815
chore: fix dydx reference url
ben-dydx-ops Dec 6, 2024
34d700f
chore: fix dydx reference url and add debugging logs
ben-dydx-ops Dec 6, 2024
a6bad94
chore: update json tester
ben-dydx-ops Dec 6, 2024
f7cb3cb
chore: update validators
rudimocnik Dec 19, 2024
7eddbe4
chore: set walletconnect wallets
rudimocnik Dec 19, 2024
65a2955
chore: update validators
rudimocnik Jan 6, 2025
dcf6f89
add workflow to deploy to preview
rudimocnik Jan 9, 2025
446999a
chore: review tc
rudimocnik Feb 3, 2025
f3521a4
chore: update privacy policy
rudimocnik Feb 17, 2025
fa18c99
chore: consolidate env.json changes
rudimocnik Feb 18, 2025
653b2df
fix: bump v4-localization
rudimocnik Feb 20, 2025
e72c7c9
feat: Generate SEO tags dynamically, replace banner image (#34)
pswies Feb 28, 2025
fd09076
feat: optimize patch deploy, delete unused workflows
rudimocnik Mar 17, 2025
b85c33a
feat: config for apps phantom support
rudimocnik Mar 19, 2025
faf2318
fix: Shorten page titles for better SEO
pswies Mar 25, 2025
057c494
chore: Add page metadata for /DYDX route
pswies Apr 15, 2025
a0c6cf6
feat: add security response headers
rudimocnik May 21, 2025
dfba4ee
feat: workflow deployer with trigger for minor versions
rudimocnik May 30, 2025
47b62ed
fix: protocol staking URL
rudimocnik Jun 24, 2025
ad40aa7
fix: use skip with no proxy
2dpetkov Jun 24, 2025
1af040e
fix: return skip proxy
2dpetkov Jun 24, 2025
866848a
fix: git rebase upstream command
2dpetkov Jun 24, 2025
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.

225 changes: 225 additions & 0 deletions .github/workflows/deployer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
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: |
git config --global user.name "dos-automation"
git config --global user.email "196231098+hedgie-svc@users.noreply.github.com"

# 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
Loading
Loading