diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 00000000..ed1dfbfb --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,52 @@ +name: Build and Deploy + +on: + push: + branches: + - master + - release + - embed + workflow_dispatch: # Allows manual triggering of the workflow + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install dependencies + run: yarn install --frozen-lockfile --network-timeout 1000000000 + + # Not yet + # - name: Upload translations to Crowdin + # if: github.ref == 'refs/heads/release' + # # Push any new code-based strings to Crowdin + # run: crowdin-dangerous-upload + # env: + # bloomCrowdinApiToken: ${{ secrets.BLOOM_CROWDIN_TOKEN }} + + - name: Download translations from Crowdin + run: yarn crowdin-download + env: + bloomCrowdinApiToken: ${{ secrets.BLOOM_CROWDIN_TOKEN }} + + - name: Build + run: | + if [ "${{ github.ref }}" == "refs/heads/master" ]; then + yarn build:ci:alpha + else + yarn build:ci + fi + + - name: Run tests + run: yarn test:ci + + # Not yet + # - name: Deploy to S3 + # run: | + # aws s3 cp path/to/build/artifacts s3://your-bucket-name --recursive + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/main.yml b/.github/workflows/lighthouse.yml similarity index 87% rename from .github/workflows/main.yml rename to .github/workflows/lighthouse.yml index b685a6c7..00a5266a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/lighthouse.yml @@ -1,11 +1,16 @@ name: Lighthouse CI + on: - push: - branches: - - master + workflow_run: + workflows: ["Build and Deploy"] + types: + - completed + workflow_dispatch: # Allows manual triggering of the workflow + jobs: lighthouse-on-live-site: runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master') }} steps: - uses: actions/checkout@v4 - name: Audit root using Lighthouse diff --git a/package.json b/package.json index 3b908757..da20139b 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "@typescript-eslint/eslint-plugin": "^5.38.0", "@typescript-eslint/parser": "^5.38.0", "async-retry": "^1.3.1", - "bloom-player": "^2.3.0", + "bloom-player": "^2.6.8-alpha.1", "concurrently": "^5.1.0", "decompress": "^4.2.1", "download": "^8.0.0", diff --git a/src/components/ReadBookPage.tsx b/src/components/ReadBookPage.tsx index 00c26a81..7a4b4ca3 100644 --- a/src/components/ReadBookPage.tsx +++ b/src/components/ReadBookPage.tsx @@ -315,6 +315,7 @@ const ReadBookPage: React.FunctionComponent = (props) => { border: none; width: 100%; height: 100%; + display: block; // Prevent a 4px white bar at the bottom of the iframe. See BL-14065. `} src={iframeSrc} //src={"https://google.com"} diff --git a/yarn.lock b/yarn.lock index 4936962c..ce8b4fd9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7215,10 +7215,10 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -bloom-player@^2.3.0: - version "2.6.4" - resolved "https://registry.yarnpkg.com/bloom-player/-/bloom-player-2.6.4.tgz#767da393d891268de4fdb4ef2e1640081e1f34c1" - integrity sha512-jtIoRcdqgeSRgHMZ5TfvDEadg/ZfTq/J6BbZTv1HudjGflIGe4DOYGSTsFcQtELrWWmqhx0PYxlKnYXirZdDaw== +bloom-player@^2.6.8-alpha.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/bloom-player/-/bloom-player-2.7.1.tgz#1ae1f14e3f12bdb36d2ecf3ee1486421bcf0fd32" + integrity sha512-2WqiHHeJkmTwuvsSBDDdJVu/m4k6smx1ViHtDq4MwvyOqJu9S7fawtHTgLNflRZZrWJ9Xusu8gm2Dg2FGpw2Fw== bluebird@^3.3.5, bluebird@^3.5.5: version "3.7.1"