Merge pull request #770 from hemilabs/cards-points-dashboard #52
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: Hostinger Deployment | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: false | |
jobs: | |
deploy-partners: | |
environment: partners | |
if: github.event_name == 'release' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: hemilabs/actions/setup-node-env@main | |
- uses: ./.github/actions/deploy-portal | |
with: | |
HOSTINGER_HOST: ${{ secrets.HOSTINGER_HOST }} | |
HOSTINGER_PORT: ${{ secrets.HOSTINGER_PORT }} | |
HOSTINGER_SSH_KEY: ${{ secrets.HOSTINGER_SSH_KEY }} | |
HOSTINGER_TARGET: domains/${{ vars[vars.HEMI_DOMAIN] }}/public_html/${{ secrets.HEMI_SUBDOMAIN }} | |
HOSTINGER_USER: ${{ secrets.HOSTINGER_USER }} | |
NEXT_PUBLIC_ANALYTICS_URL: ${{ vars.NEXT_PUBLIC_ANALYTICS_URL }} | |
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID: ${{ vars.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_MAINNET: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_MAINNET }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_SEPOLIA: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_SEPOLIA }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_MAINNET: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_MAINNET }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_SEPOLIA: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_SEPOLIA }} | |
NEXT_PUBLIC_ENABLE_ANALYTICS: false | |
NEXT_PUBLIC_FEATURE_FLAG_ENABLE_BTC_TUNNEL: ${{ vars.NEXT_PUBLIC_FEATURE_FLAG_ENABLE_BTC_TUNNEL || 'false' }} | |
NEXT_PUBLIC_FEATURE_FLAG_ENABLE_MAINNET: ${{ vars.NEXT_PUBLIC_FEATURE_FLAG_ENABLE_MAINNET || 'false' }} | |
deploy: | |
environment: ${{ github.event_name == 'release' && 'production' || 'staging' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: bloq/actions/notify-deploy-to-slack@v1 | |
with: | |
app-name: Hemi Portal | |
environment: ${{ vars.ENVIRONMENT_NAME }} | |
reference: ${{ github.event_name == 'release' && github.event.release.name || github.event.head_commit.message }} | |
slack-mention: ${{ vars.SLACK_MENTION }} | |
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
status: 'started :stopwatch:' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: hemilabs/actions/setup-node-env@main | |
- uses: ./.github/actions/deploy-portal | |
with: | |
HOSTINGER_HOST: ${{ secrets.HOSTINGER_HOST }} | |
HOSTINGER_PORT: ${{ secrets.HOSTINGER_PORT }} | |
HOSTINGER_SSH_KEY: ${{ secrets.HOSTINGER_SSH_KEY }} | |
HOSTINGER_TARGET: domains/${{ vars[vars.HEMI_DOMAIN] }}/public_html/app | |
HOSTINGER_USER: ${{ secrets.HOSTINGER_USER }} | |
NEXT_PUBLIC_ANALYTICS_URL: ${{ vars.NEXT_PUBLIC_ANALYTICS_URL }} | |
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID: ${{ vars.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_MAINNET: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_MAINNET }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_SEPOLIA: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_HEMI_SEPOLIA }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_MAINNET: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_MAINNET }} | |
NEXT_PUBLIC_CUSTOM_RPC_URL_SEPOLIA: ${{ vars.NEXT_PUBLIC_CUSTOM_RPC_URL_SEPOLIA }} # TODO: REMOVE FROM ORG VARS | |
NEXT_PUBLIC_ENABLE_ANALYTICS: ${{ github.event_name == 'release' }} | |
NEXT_PUBLIC_FEATURE_FLAG_ENABLE_BTC_TUNNEL: ${{ vars.NEXT_PUBLIC_FEATURE_FLAG_ENABLE_BTC_TUNNEL || 'false' }} | |
NEXT_PUBLIC_FEATURE_FLAG_ENABLE_MAINNET: ${{ vars.NEXT_PUBLIC_FEATURE_FLAG_ENABLE_MAINNET || 'false' }} | |
NEXT_PUBLIC_FEATURE_FLAG_ENABLE_STAKE_CAMPAIGN: ${{ vars.NEXT_PUBLIC_FEATURE_FLAG_ENABLE_STAKE_CAMPAIGN || 'false' }} | |
NEXT_PUBLIC_SENTRY_DSN: ${{ vars.NEXT_PUBLIC_SENTRY_DSN }} | |
NEXT_PUBLIC_TRACES_SAMPLE_RATE: ${{ vars.NEXT_PUBLIC_TRACES_SAMPLE_RATE }} | |
SENTRY_AUTH_TOKEN: ${{ github.event_name == 'release' && secrets.SENTRY_AUTH_TOKEN_PROD || '' }} # TODO: ASK OP TO MOVE TO ENV SECRETS | |
SENTRY_ENVIRONMENT: ${{ vars.ENVIRONMENT_NAME }} | |
SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
SENTRY_RELEASE: ${{ format('{0}@{1}', vars.SENTRY_PROJECT, github.event.release.name) }} | |
- if: ${{ !cancelled() }} | |
uses: bloq/actions/notify-deploy-to-slack@v1 | |
with: | |
app-name: Hemi Portal | |
environment: ${{ vars.ENVIRONMENT_NAME }} | |
slack-mention: ${{ vars.SLACK_MENTION }} | |
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | |
status: ${{ job.status == 'failure' && 'failed :boom:' || 'finished :ok:' }} |