aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joseph Garrone <[email protected]>2024-02-13 02:36:56 +0100
committerGravatar Joseph Garrone <[email protected]>2024-02-13 02:36:56 +0100
commit4097f20e8cafc0c130231b6aea454bcafb229b3d (patch)
treef35b220411397ffb9b67dcbeb903b35883e2c534
parentBump version (diff)
Improve documentation
-rw-r--r--.github/workflows/ci.yaml4
-rw-r--r--README.md10
-rw-r--r--vite.config.ts9
3 files changed, 16 insertions, 7 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 7fc87fe..a182218 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -98,7 +98,9 @@ jobs:
- uses: bahmutov/npm-install@v1
- run: yarn build
# We tell GitHub pages that our package.json["homepage"] field is our domain name.
- - run: echo $(node -e 'console.log(require("url").parse(require("./package.json").homepage).host)') > build/CNAME
+ # If you wish to use the default GitHub pages domain name, like https://<username>.github.io/<repo>,
+ # you'll have to use base: "/repo/" in your vite.config.ts.
+ - run: echo $(node -e 'console.log(require("url").parse(require("./package.json").homepage).host)') > dist/CNAME
- run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index e4520a2..7a07223 100644
--- a/README.md
+++ b/README.md
@@ -65,16 +65,16 @@ You can enable this feature by providing multiple theme name in the Keycloakify
# The CI workflow
-- You need to manually allow GitHub Action to push on your repository. For this reason the initial setup will fail. You need to enabled permission and re-run failed job: [see video](https://user-images.githubusercontent.com/6702424/213480604-0aac0ea7-487f-491d-94ae-df245b2c7ee8.mov).
+- To release **don't create a tag manually**, the CI do it for you. Just update the `package.json`'s version field and push.
+- The `.jar` files that bundle the Keycloak theme will be attached as an asset with every GitHub release. [Example](https://github.com/InseeFrLab/keycloakify-starter/releases/tag/v0.1.0). The permalink to download the latest version is: `https://github.com/USER/PROJECT/releases/latest/download/keycloak-theme.jar`.
+ For this demo repo it's [here](https://github.com/codegouvfr/keycloakify-starter/releases/latest/download/keycloak-theme.jar)
- This CI is configured to publish [the app](https://starter.keycloakify.dev) on [GitHub Pages](https://github.com/codegouvfr/keycloakify-starter/blob/3617a71deb1a6544c3584aa8d6d2241647abd48c/.github/workflows/ci.yaml#L51-L76) and on [DockerHub](https://github.com/codegouvfr/keycloakify-starter/blob/3617a71deb1a6544c3584aa8d6d2241647abd48c/.github/workflows/ci.yaml#L78-L123) (as a Ngnix based docker image). In practice you probably want one or the other but not both... or neither if you are just building a theme (and not a theme + an app).
If you want to enable the CI to publish on DockerHub on your behalf go to repository `Settings` tab, then `Secrets` you will need to add two new secrets:
`DOCKERHUB_TOKEN`, you Dockerhub authorization token.
`DOCKERHUB_USERNAME`, Your Dockerhub username.
We deploy the demo app at [starter.keycloakify.dev](https://starter.keycloakify.dev) using GitHub page on the branch `gh-pages` (you have to enable it).
- To configure your own domain name please refer to [this documentation](https://docs.gitlanding.dev/using-a-custom-domain-name).
-- To release **don't create a tag manually**, the CI do it for you. Just update the `package.json`'s version field and push.
-- The `.jar` files that bundle the Keycloak theme will be attached as an asset with every GitHub release. [Example](https://github.com/InseeFrLab/keycloakify-starter/releases/tag/v0.1.0). The permalink to download the latest version is: `https://github.com/USER/PROJECT/releases/latest/download/keycloak-theme.jar`.
- For this demo repo it's [here](https://github.com/codegouvfr/keycloakify-starter/releases/latest/download/keycloak-theme.jar)
+ To configure your own domain name update the homepage field of the `package.json` and potentially the `base` option in the `vite.config.ts`.
+ Regarding DNS configuration you can refer to [this documentation](https://docs.gitlanding.dev/using-a-custom-domain-name).
- The CI publishes the app docker image on DockerHub. `<org>/<repo>:main` for each **commit** on `main`, `<org>/<repo>:<feature-branch-name>` for each **pull-request** on `main`
and when **releasing a new version**: `<org>/<repo>:latest` and `<org>/<repo>:X.Y.Z`
[See on DockerHub](https://hub.docker.com/r/codegouvfr/keycloakify-starter)
diff --git a/vite.config.ts b/vite.config.ts
index e4587f3..c0c54e3 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -11,5 +11,12 @@ export default defineConfig({
react(),
commonjs(),
keycloakify()
- ]
+ ],
+ /*
+ * Uncomment this if you want to use the default domain provided by GitHub Pages
+ * replace "keycloakify-starter" with your repository name.
+ * This is only relevent if you are building an Wep App + A Keycloak theme.
+ * If you are only building a Keycloak theme, you can ignore this.
+ */
+ //base: "/keycloakify-starter/"
})