Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version v1.0.2 #78

Merged
merged 12 commits into from
Aug 1, 2024
Merged
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.docker/
!.docker/nginx.conf
.git/
.github/
dist/
k8s/
node_modules/
.dockerignore
.editorconfig
.gitignore
.node-version
CHANGELOG.md
README.md
12 changes: 11 additions & 1 deletion .github/workflows/build-and-push-develop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Build and Push Docker Image Develop
"on":
push:
paths:
- "**/**"
- "!.github/**"
- "!k8s/**"
- "!.dockerignore"
- "!.editorconfig"
- "!.gitignore"
- "!.node-version"
- "!CHANGELOG.md"
- "!README.md"
branches:
- develop

Expand Down Expand Up @@ -43,7 +53,7 @@ jobs:
with:
context: .
file: ./.docker/Dockerfile.dev
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ghcr.io/${{ env.REPO_LC }}-dev:latest, ghcr.io/${{ env.REPO_LC }}-dev:${{ env.COMMIT_SHA }}

Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/build-and-push-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Build and Push Docker Image Production

on:
pull_request:
paths:
- "**/**"
- "!.github/**"
- "!k8s/**"
- "!.dockerignore"
- "!.editorconfig"
- "!.gitignore"
- "!.node-version"
- "!CHANGELOG.md"
- "!README.md"
branches:
- main
types:
Expand Down Expand Up @@ -84,7 +94,7 @@ jobs:
with:
context: .
file: ./.docker/Dockerfile.prod
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ghcr.io/${{ env.REPO_LC }}:${{ env.RELEASE_VERSION }}, ghcr.io/${{ env.REPO_LC }}:latest

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build-and-push-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Build and Push Docker Image Staging
"on":
workflow_dispatch:
push:
paths:
- "**/**"
- "!.github/**"
- "!k8s/**"
- "!.dockerignore"
- "!.editorconfig"
- "!.gitignore"
- "!.node-version"
- "!CHANGELOG.md"
- "!README.md"
branches:
- release/*
- hotfix/*
Expand Down Expand Up @@ -72,7 +82,7 @@ jobs:
with:
context: .
file: ./.docker/Dockerfile.stage
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ghcr.io/${{ env.REPO_LC }}-stage:${{ env.RELEASE_VERSION }}-preview, ghcr.io/${{ env.REPO_LC }}-stage:latest, ghcr.io/${{ env.REPO_LC }}-stage:${{ env.COMMIT_SHA }}

Expand All @@ -82,7 +92,7 @@ jobs:
with:
context: .
file: ./.docker/Dockerfile.stage
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ghcr.io/${{ env.REPO_LC }}-stage:latest, ghcr.io/${{ env.REPO_LC }}-stage:${{ env.COMMIT_SHA }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:

build_and_deploy_stage:
runs-on: ubuntu-latest
needs: draft_new_release
permissions:
contents: write
packages: write
Expand Down Expand Up @@ -117,7 +118,7 @@ jobs:
with:
context: .
file: ./.docker/Dockerfile.stage
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ghcr.io/${{ env.REPO_LC }}-stage:${{ env.RELEASE_VERSION }}-preview, ghcr.io/${{ env.REPO_LC }}-stage:latest, ghcr.io/${{ env.REPO_LC }}-stage:${{ env.COMMIT_SHA }}

Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.0.2] - 2024-08-01

### Changed

- refactor: change cookies to local storage (#77)
- ci: run only github actions when needed (#76)

## [v1.0.1] - 2024-07-17

### Changed
Expand Down Expand Up @@ -44,7 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release
- Create "Page under construction" Page

[Unreleased]: https://github.com/green-ecolution/project-website/compare/v1.0.1...HEAD
[Unreleased]: https://github.com/green-ecolution/project-website/compare/v1.0.2...HEAD

[v1.0.2]: https://github.com/green-ecolution/project-website/compare/v1.0.1...v1.0.2

[v1.0.1]: https://github.com/green-ecolution/project-website/compare/v1.0.0...v1.0.1

Expand Down
2 changes: 1 addition & 1 deletion k8s/values/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ deployment:
image:
repository: ghcr.io/green-ecolution/project-website-dev
pullPolicy: Always
tag: "1ffbc46"
tag: "d1b889b"
ingress:
enabled: true
className: "traefik"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "project-website",
"private": true,
"version": "v1.0.1",
"version": "v1.0.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
4 changes: 2 additions & 2 deletions src/tsx/components/cards/WelcomeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Arrow from '../../icons/Arrow';
import Lottie from 'lottie-react';
import logoAnimation from '../../../json/logoAnimation.json';
import { useOutsideClick } from '../../hooks/useOutsideClick';
import { hasCookie } from '../../helper/cookies';
import { isInitialLoad } from '../../helper/storage';

interface WelcomeCardProps {
onClose: () => void;
Expand All @@ -29,7 +29,7 @@ const WelcomeCard: React.FC<WelcomeCardProps> = ({ onClose, handleStartAnmiation
};

useEffect(() => {
if (! hasCookie('green_ecolution_initial_load') && isOverlayVisible) {
if (isInitialLoad() && isOverlayVisible) {
const timer = setTimeout(() => { setIsVisible(true) }, delay + 200);
return () => clearTimeout(timer);
}
Expand Down
10 changes: 5 additions & 5 deletions src/tsx/components/homepage/HomepageHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState, useEffect } from "react";
import Arrow from "../../icons/Arrow";
import HomepageOverlay from "./HomepageOverlay";
import HomepageHeroTrees from "./HomepageHeroTrees";
import { setCookie, hasCookie } from "../../helper/cookies";
import { setInitialLoad as setInitialLoadHelper, isInitialLoad as isInitialLoadHelper } from "../../helper/storage";

function HomepageHero() {
const [isOverlayVisible, setIsOverlayVisible] = useState(false);
Expand All @@ -14,7 +14,7 @@ function HomepageHero() {

if (isInitialLoad) {
setIsInitialLoad(false);
setCookie('green_ecolution_initial_load');
setInitialLoadHelper();
}
};

Expand All @@ -41,8 +41,8 @@ function HomepageHero() {
}, [isOverlayVisible]);

useEffect(() => {
if (! hasCookie('green_ecolution_initial_load')
&& ! isOverlayVisible
if (isInitialLoadHelper()
&& !isOverlayVisible
&& window.matchMedia('(min-width: 1280px)').matches
) {
setIsInitialLoad(true);
Expand Down Expand Up @@ -76,7 +76,7 @@ function HomepageHero() {
</p>
<button
className={`hidden items-center justify-center gap-x-4 rounded-2xl w-max font-semibold px-5 py-2 group bg-green-light-900 transition-color ease-in-out duration-300 text-white hover:bg-green-middle-900 hover:border-green-middle-900
${hasCookie('green_ecolution_initial_load') ? 'xl:flex' : '' }`}
${!isInitialLoadHelper() ? 'xl:flex' : '' }`}
onClick={handleOpenOverlay}
>
Animation abspielen
Expand Down
32 changes: 0 additions & 32 deletions src/tsx/helper/cookies.ts

This file was deleted.

7 changes: 7 additions & 0 deletions src/tsx/helper/storage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function setInitialLoad() {
localStorage.setItem("green_ecolution_initial_load", "false");
}

export function isInitialLoad(): boolean {
return localStorage.getItem("green_ecolution_initial_load") !== "false";
}
Loading