Improve documentation
This commit is contained in:
parent
33be752c6f
commit
4097f20e8c
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
@ -98,7 +98,9 @@ jobs:
|
|||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
# We tell GitHub pages that our package.json["homepage"] field is our domain name.
|
# 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
|
- run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
10
README.md
10
README.md
@ -65,16 +65,16 @@ You can enable this feature by providing multiple theme name in the Keycloakify
|
|||||||
|
|
||||||
# The CI workflow
|
# 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).
|
- 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:
|
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_TOKEN`, you Dockerhub authorization token.
|
||||||
`DOCKERHUB_USERNAME`, Your Dockerhub username.
|
`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).
|
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 configure your own domain name update the homepage field of the `package.json` and potentially the `base` option in the `vite.config.ts`.
|
||||||
- To release **don't create a tag manually**, the CI do it for you. Just update the `package.json`'s version field and push.
|
Regarding DNS configuration you can refer to [this documentation](https://docs.gitlanding.dev/using-a-custom-domain-name).
|
||||||
- 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)
|
|
||||||
- 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`
|
- 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`
|
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)
|
[See on DockerHub](https://hub.docker.com/r/codegouvfr/keycloakify-starter)
|
||||||
|
@ -11,5 +11,12 @@ export default defineConfig({
|
|||||||
react(),
|
react(),
|
||||||
commonjs(),
|
commonjs(),
|
||||||
keycloakify()
|
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/"
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user