From e3c868c0bf42279eb2e88e4316f1b26e9fcd6242 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Thu, 18 Jul 2024 14:15:38 +0200 Subject: [PATCH] fix(ci): print cloudflare summary in comments also update i18n docs so we trigger docs build. --- .github/workflows/ci.yml | 47 +++++++++++-------- .../routes/docs/integrations/i18n/index.mdx | 10 ++++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f35aa8148b..26f6eae63dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,12 +251,9 @@ jobs: name: Bundle Qwik if: | always() && - (needs.build-qwik.result == 'success' || - needs.build-qwik.result == 'skipped') && - (needs.build-linux-wasm-bindings.result == 'success' || - needs.build-linux-wasm-bindings.result == 'skipped') && - (needs.build-other-bindings.result == 'success' || - needs.build-other-bindings.result == 'skipped') + (needs.build-qwik.result == 'success' || needs.build-qwik.result == 'skipped') && + (needs.build-linux-wasm-bindings.result == 'success' || needs.build-linux-wasm-bindings.result == 'skipped') && + (needs.build-other-bindings.result == 'success' || needs.build-other-bindings.result == 'skipped') runs-on: ubuntu-latest needs: - build-qwik @@ -507,25 +504,28 @@ jobs: packages/docs/server - name: Cloudflare Pages Deployment - uses: cloudflare/pages-action@v1 + # not the official version, so be careful when updating + uses: AdrianGonz97/refined-cf-pages-action@c7b767eef599f127d8ce2388d4ed2270d3b750af with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: 'qwik-docs' directory: packages/docs/dist - gitHubToken: ${{ secrets.GITHUB_TOKEN }} + githubToken: ${{ secrets.GITHUB_TOKEN }} ############ UNIT TEST ############ test-unit: name: Unit Tests if: | always() && ( - ((needs.changes.outputs.build-qwik == 'true' || + github.ref == 'refs/heads/main' || ( + ( + needs.changes.outputs.build-qwik == 'true' || needs.changes.outputs.build-others == 'true' || - needs.changes.outputs.build-rust == 'true') && + needs.changes.outputs.build-rust == 'true' + ) && needs.build-other-packages.result == 'success' - ) || - github.ref == 'refs/heads/main' + ) ) runs-on: ubuntu-latest needs: @@ -571,13 +571,14 @@ jobs: name: E2E Tests if: | always() && ( - ((needs.changes.outputs.build-qwik == 'true' || - needs.changes.outputs.build-others == 'true' || - needs.changes.outputs.build-rust == 'true') && + github.ref == 'refs/heads/main' || ( needs.build-other-packages.result == 'success' && - needs.test-unit.result == 'success' - ) || - github.ref == 'refs/heads/main' + needs.test-unit.result == 'success' && ( + needs.changes.outputs.build-qwik == 'true' || + needs.changes.outputs.build-others == 'true' || + needs.changes.outputs.build-rust == 'true' + ) + ) ) needs: @@ -833,7 +834,15 @@ jobs: - changes - release - if: always() && (needs.changes.outputs.build-qwik == 'true' || needs.changes.outputs.build-rust == 'true' || needs.changes.outputs.build-others == 'true') && needs.release.result == 'success' && github.ref_name == 'main' + if: | + always() && + ( + needs.changes.outputs.build-qwik == 'true' || + needs.changes.outputs.build-rust == 'true' || + needs.changes.outputs.build-others == 'true' + ) && + needs.release.result == 'success' && + github.ref_name == 'main' steps: - name: Repository Dispatch diff --git a/packages/docs/src/routes/docs/integrations/i18n/index.mdx b/packages/docs/src/routes/docs/integrations/i18n/index.mdx index 79ef9b8f50f..e1cb7b037b5 100644 --- a/packages/docs/src/routes/docs/integrations/i18n/index.mdx +++ b/packages/docs/src/routes/docs/integrations/i18n/index.mdx @@ -106,6 +106,16 @@ Alternatively, you can use the `deepl-localize` command to translate your string } ``` +### compiled-i18n + +[compiled-i18n](https://github.com/wmertens/compiled-i18n) is inspired by the $localize system from Angular. It only requires a plugin to be added to the Vite configuration. + +It supports both runtime and compile-time translations. + +See the [Qwik-specific instructions](https://github.com/wmertens/compiled-i18n/blob/main/qwik.md). + +Automatic translation is supported via [deepl-localize](https://github.com/tzdesign/deepl-localize). + ### qwik-speak [qwik-speak](https://github.com/robisim74/qwik-speak) library to translate texts, dates and numbers in Qwik apps.