Skip to content

feat(i18n): extract ingest source display names, descriptions, and ca… #22783

feat(i18n): extract ingest source display names, descriptions, and ca…

feat(i18n): extract ingest source display names, descriptions, and ca… #22783

name: Frontend Preview
on:
push:
branches:
- master
paths-ignore:
- "docs/**"
- "**.md"
- ".github/**"
- "!.github/workflows/react-cloudflare-pages.yml"
pull_request:
branches:
- "**"
paths-ignore:
- "docs/**"
- "**.md"
- ".github/**"
- "!.github/workflows/react-cloudflare-pages.yml"
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
setup:
runs-on: ubuntu-22.04
outputs:
frontend_change: ${{ steps.ci-optimize.outputs.frontend-change == 'true' }}
cloudflare_token_available: ${{ steps.cloudflare-token-check.outputs.cloudflare_token_available }}
steps:
- name: Check out the repo
uses: acryldata/sane-checkout-action@186e92cc5948a9c3e1cc7a96eaff9f776f3fc8e3 # v7
- uses: ./.github/actions/ci-optimization
id: ci-optimize
- name: Check if cloudflare api token is available
id: cloudflare-token-check
env:
API_TOKEN_AVAILABLE: ${{ secrets.CLOUDFLARE_API_TOKEN != '' }}
run: |
echo "API_TOKEN_AVAILABLE is : ${{ env.API_TOKEN_AVAILABLE }}"
echo "cloudflare_token_available=${{ env.API_TOKEN_AVAILABLE }}" >> "$GITHUB_OUTPUT"
deploy:
runs-on: ubuntu-22.04
permissions:
contents: read
deployments: write
timeout-minutes: 30
needs: setup
if: ${{ github.event.pull_request.head.repo.fork != 'true' }}
steps:
- name: Check out the repo
uses: acryldata/sane-checkout-action@186e92cc5948a9c3e1cc7a96eaff9f776f3fc8e3 # v7
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: "zulu"
java-version: 21
- uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: Gradle build for frontend
if: ${{ needs.setup.outputs.frontend_change == 'true' }}
run: |
./gradlew :datahub-web-react:build -x test -x check --parallel
- name: Publish
if: ${{ needs.setup.outputs.frontend_change == 'true' && needs.setup.outputs.cloudflare_token_available == 'true' }}
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: datahub-project-web-react
workingDirectory: datahub-web-react
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}