Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:hop-protocol/hop into production
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed May 18, 2024
2 parents 86116f5 + 197fc38 commit 20e290d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/ui-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- production
paths:
- 'packages/frontend/**'
env:
PRODUCTION_ENVS: production
STAGING_ENVS: mainnet,sepolia

jobs:
publishable-packages:
Expand All @@ -14,20 +17,35 @@ jobs:
with:
package-names: 'frontend'

publishable-environments:
name: Check for environment that can be published
outputs:
publishable-environments: ${{ steps.publishable-environments.outputs.publishable_environments }}
runs-on: ubuntu-latest
steps:
- name: Get environments
id: publishable-environments
run: |
if [ "${{ github.ref_name }}" == "production" ]; then
publishable_environments=${{ env.PRODUCTION_ENVS }}
else
publishable_environments=${{ env.STAGING_ENVS }}
fi
# Format for matrix
publishable_environments=$(echo $publishable_environments | tr ',' '\n' | sed 's/^ *//;s/ *$//' | jq -R -s -c 'split("\n")[:-1]')
echo publishable_environments=$publishable_environments >> $GITHUB_OUTPUT
build-ui:
name: Build and Deploy UI
needs: publishable-packages
needs: [publishable-packages, publishable-environments]
runs-on: ubuntu-latest
# If the frontend hasn't been modified, skip
if: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages)[0] != '' }}
environment: ${{ matrix.env-name }}
strategy:
matrix:
package-name: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages) }}
env-name:
- production
- mainnet
- sepolia
env-name: ${{ fromJson(needs.publishable-environments.outputs.publishable-environments) }}
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
Expand Down Expand Up @@ -84,8 +102,6 @@ jobs:
cidv0: ${{ steps.upload.outputs.hash }}

- name: Create GitHub Release
# Only create a release on the production branch
if: matrix.env-name == 'production'
env:
CIDv0: ${{ steps.upload.outputs.hash }}
CIDv1: ${{ steps.convert_cidv0.outputs.cidv1 }}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (process.env.REACT_APP_NETWORK === 'goerli') {
showRewards = false
}

const cacheBuster: number = 13
const cacheBuster: number = 15

export { showRewards }

Expand Down

0 comments on commit 20e290d

Please sign in to comment.