Skip to content

Commit

Permalink
Merge pull request #77 from gipplab/treemap-font-size
Browse files Browse the repository at this point in the history
Treemap font size
  • Loading branch information
jpwahle authored Aug 9, 2022
2 parents 22d8f56 + 3399184 commit d6f7362
Show file tree
Hide file tree
Showing 15 changed files with 4,421 additions and 9,411 deletions.
16 changes: 0 additions & 16 deletions .devcontainer/Dockerfile

This file was deleted.

33 changes: 0 additions & 33 deletions .devcontainer/devcontainer.json

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: 🏁 Checkout
uses: actions/checkout@v2

- name: ✅ Setup node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies

- name: 📦 Install dependencies
run: |
npm install
- name: Run linting
- name: 📘 Run linting
run: |
npm run lint
npm run lint
52 changes: 38 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,89 @@ jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 🏁 Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: '0'
- uses: actions/setup-node@v2

- name: ✅ Setup node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Bump version and push tag

- name: 🏷 Bump version and push tag
uses: anothrNick/[email protected]
id: tagging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Build Changelog

- name: 📝 Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release

- name: 📦 Create Release
uses: actions/create-release@v1
with:
release_name: ${{steps.tagging.outputs.tag}}
body: ${{steps.build_changelog.outputs.changelog}}
tag_name: ${{steps.tagging.outputs.tag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update npm package version

- name: ⬆️ Update npm package version
uses: reedyuk/[email protected]
with:
version: ${{steps.tagging.outputs.tag}}
- name: Commit files

- name: ➕ Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions[bot]"
git add package.json
git commit -m "[release-bot] Update npm version"
- name: Push changes
- name: 💨 Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
branch: ${{ github.ref }}
- name: Set up QEMU

- name: 🐳 Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx

- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub

- name: 🔑 Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push version

- name: 🐳 Build and push version
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jpelhaw/nlp-land-frontend:${{steps.tagging.outputs.tag}}
- name: Build and push latest

- name: 🐳 Build and push latest
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jpelhaw/nlp-land-frontend:latest
tags: jpelhaw/nlp-land-frontend:latest

- name: 🔑 Docker GitHub package login
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}

- name: 🐳 Build docker image
run: docker build -t ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}} -t ghcr.io/gipplab/cs-insights-frontend:latest .

- name: 📦 Push docker image
run: |
docker push ghcr.io/gipplab/cs-insights-frontend:${{steps.tagging.outputs.tag}}
docker push ghcr.io/gipplab/cs-insights-frontend:latest
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:18 as builder

RUN mkdir /frontend-server
WORKDIR /frontend-server
COPY ./ /frontend-server
RUN mkdir /cs-insights-frontend
WORKDIR /cs-insights-frontend
COPY ./ /cs-insights-frontend

WORKDIR /cs-insights-frontend
RUN npm install
RUN npm run build --omit=dev


FROM nginx:latest

COPY --from=builder /frontend-server/build /usr/share/nginx/html/
COPY --from=builder /frontend-server/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /cs-insights-frontend/build /usr/share/nginx/html/
COPY --from=builder /cs-insights-frontend/nginx.conf /etc/nginx/conf.d/default.conf
6 changes: 6 additions & 0 deletions Dockerfile.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:18

WORKDIR /cs-insights-frontend
COPY package.json .
COPY package-lock.json .
RUN npm install --include=dev
49 changes: 2 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cs-insights-frontend

<p>
<p align="center">
<a href="https://github.com/gipplab/cs-insights-frontend/actions/workflows/release.yml"><img alt="Actions Status" src="https://github.com/gipplab/cs-insights-frontend/actions/workflows/release.yml/badge.svg?branch=dev"></a>
<a href="https://github.com/gipplab/cs-insights-frontend/actions/workflows/main.yml"><img alt="Actions Status" src="https://github.com/gipplab/cs-insights-frontend/actions/workflows/main.yml/badge.svg"></a>
<a href="https://github.com/gipplab/cs-insights-frontend/releases"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/gipplab/cs-insights-frontend?sort=semver"></a>
Expand All @@ -14,53 +14,8 @@
</a>

## Getting Started
After cloning the repository you need to change the directory.
```shell
cd cs-insights-frontend
```
Then we are providing two ways to set up this project.
In both cases, make sure the [backend](https://github.com/gipplab/cs-insights-backend) is running after the setup, so you can properly use the app.

<details> <summary> Production </summary>

First you need to create an `.env.production` file.
You can copy the `.env.development` file, if you do not intent to change the default values:
```shell
cp .env.development .env.production
```

Then you need to install all dependencies with
```shell
npm install --production
```
and build the project using
```shell
npm run build
```
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.

Lastly, deploy the project (see [here](https://create-react-app.dev/docs/deployment/) for alternatives) with
```shell
npm install -g serve
serve -s build -l 3001
```
and visit it in your browser on [http://localhost:3001](http://localhost:3001).
</details>
<details> <summary> Development </summary>

First, you need to install all dependencies using
```shell
npm install
```

Then you can run the app in development mode with
```shell
npm start
```
and visit it in your browser on [http://localhost:3001](http://localhost:3001).
The page will reload if you make edits, and you will see any lint errors in the console.
</details>
This project is part of the `cs-insights`-ecosystem. Please refer to the readme [here](https://github.com/gipplab/cs-insights-main) to spin up the development and production system.


## Repository
Expand Down
Loading

0 comments on commit d6f7362

Please sign in to comment.