This commit is contained in:
Joseph Garrone 2024-06-06 09:42:01 +02:00
parent 180271454d
commit 0c36e4b6f4
6 changed files with 37 additions and 31 deletions

View file

@ -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 }}

View file

@ -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
```

View file

@ -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"
},

View file

@ -37,12 +37,3 @@ export function createPageStory<PageId extends KcContext["pageId"]>(params: {
return { PageStory };
}
export const parameters = {
viewMode: "story",
previewTabs: {
"storybook/docs/panel": {
hidden: true
}
}
};

View file

@ -37,6 +37,3 @@ export function createPageStory<PageId extends KcContext["pageId"]>(params: {
return { PageStory };
}
export const parameters = {
};

View file

@ -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"