This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,14 @@ jobs: | |
yarn install --frozen-lockfile | ||
yarn build | ||
# yarn test | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: node_modules | ||
path: node_modules | ||
|
||
check_if_version_upgraded: | ||
name: Check if version upgrade | ||
|
@@ -75,10 +83,15 @@ jobs: | |
fi | ||
OUT=$(echo "$OUT" | awk '{print tolower($0)}') | ||
echo ::set-output name=docker_tags::$OUT | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ${{ steps.step1.outputs.docker_tags }} | ||
file: Dockerfile.ci | ||
|
||
|
||
build_keycloak_theme: | ||
name: Build keycloak theme | ||
|
@@ -90,10 +103,13 @@ jobs: | |
with: | ||
ref: ${{ needs.check_if_version_upgraded.outputs.branch }} | ||
- uses: actions/setup-node@v1 | ||
- run: | | ||
yarn install --frozen-lockfile | ||
yarn build | ||
npx build-keycloak-theme | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: node_modules | ||
- run: npx build-keycloak-theme --external-assets | ||
- name: Upload keycloak theme | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
@@ -153,6 +169,22 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy_on_gh_pages: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '15' | ||
- run: git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: npx -y -p [email protected] gh-pages -d build -u "github-actions-bot <[email protected]>" | ||
|
||
debug: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# build environment | ||
FROM node:14.16.0-alpine as build | ||
WORKDIR /app | ||
COPY build build | ||
|
||
# production environment | ||
FROM nginx:stable-alpine | ||
COPY --from=build /app/build /usr/share/nginx/html | ||
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters