From 0c36e4b6f418f9b7575ef7570de122929f000eb3 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 6 Jun 2024 09:42:01 +0200 Subject: [PATCH] update --- .github/workflows/ci.yaml | 23 ++++++++++------------- README.md | 21 +++++++++++++++++++++ package.json | 4 ++-- src/account/PageStory.tsx | 9 --------- src/login/PageStory.tsx | 3 --- yarn.lock | 8 ++++---- 6 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 894408d..16bd862 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,11 +11,10 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 - uses: bahmutov/npm-install@v1 - - run: yarn build - - run: npx keycloakify + - run: yarn build-keycloak-theme check_if_version_upgraded: name: Check if version upgrade @@ -39,14 +38,11 @@ jobs: # We create a release only if the version have been upgraded and we are on a default branch if: needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' && github.event_name == 'push' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 - uses: bahmutov/npm-install@v1 - - run: yarn build - - run: npx keycloakify - - run: mv dist_keycloak/target/retrocompat-*.jar retrocompat-keycloak-theme.jar - - run: mv dist_keycloak/target/*.jar keycloak-theme.jar - - uses: softprops/action-gh-release@v1 + - run: yarn build-keycloak-theme + - uses: softprops/action-gh-release@v2 with: name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }} tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }} @@ -54,7 +50,8 @@ jobs: generate_release_notes: true draft: false files: | - retrocompat-keycloak-theme.jar - keycloak-theme.jar + dist_keycloak/keycloak-theme-for-kc-21-and-below.jar + dist_keycloak/keycloak-theme-for-kc-23.jar + dist_keycloak/keycloak-theme-for-kc-24-and-above.jar env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 4aeeb42..fb64e29 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,24 @@ of some pages use the command: ```bash npx keycloakify eject-page ``` + +# GitHub Actions + +The starter comes with a GitHub Actions workflow that builds the theme and publishes +the jars [as GitHub releases artifacts](https://github.com/keycloakify/keycloakify-starter/releases/tag/v7.1.0). + +# Removing the account theme + +If you don't need to customize [the account theme pages](https://storybook.keycloakify.dev/?path=/story/account-account--default). +You can remove the `src/account` directory and make the necessary changes in `src/main.tsx` and `src/vite-env.d.ts`. +This will significantly reduce the the size of the jar and the build time. + +# Email theme + +Keycloakify lets you bundle an email theme however customization can't be made with React yet. +It's just a regular Keycloak theme. + +```bash +npx keycloakify initialize-email-theme +``` + diff --git a/package.json b/package.json index 3b4735d..eba9831 100755 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "build-keycloak-theme": "yarn build && keycloakify", + "build-keycloak-theme": "yarn build && keycloakify build", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "format": "npx prettier . --write" @@ -18,7 +18,7 @@ "license": "MIT", "keywords": [], "dependencies": { - "keycloakify": "10.0.0-rc.33", + "keycloakify": "10.0.0-rc.34", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/src/account/PageStory.tsx b/src/account/PageStory.tsx index 77cb0fb..d4f8aad 100644 --- a/src/account/PageStory.tsx +++ b/src/account/PageStory.tsx @@ -37,12 +37,3 @@ export function createPageStory(params: { return { PageStory }; } - -export const parameters = { - viewMode: "story", - previewTabs: { - "storybook/docs/panel": { - hidden: true - } - } -}; diff --git a/src/login/PageStory.tsx b/src/login/PageStory.tsx index c9ce79c..ecdf147 100644 --- a/src/login/PageStory.tsx +++ b/src/login/PageStory.tsx @@ -37,6 +37,3 @@ export function createPageStory(params: { return { PageStory }; } - -export const parameters = { -}; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index e1f1c94..261e563 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5011,10 +5011,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -keycloakify@10.0.0-rc.33: - version "10.0.0-rc.33" - resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-10.0.0-rc.33.tgz#2a522facaf3138e7c9b699e95ef45cfc73ab0296" - integrity sha512-rByUFHqsSQ1P9ZsnbCtB02rHfF38J4+dV0gr/oArAviLt6NauO2r3KoRKMtkeT/1OKCvkthvK7cloFWEjBDiBQ== +keycloakify@10.0.0-rc.34: + version "10.0.0-rc.34" + resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-10.0.0-rc.34.tgz#1909a053bd3f292afad6c98e59ecddfbf06f47b8" + integrity sha512-CAGc4h2CS0Q/Ol02ZANk/jd0ekrNgb8wlI8M8n0SficVNE4JI7+dMlrBfj8ZEmPh21enb/apQm48mj4KrjvSHA== dependencies: react-markdown "^5.0.3" tsafe "^1.6.6"