build(deps-dev): bump jsdom from 24.1.1 to 25.0.1 in /website #149
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
name: website | |
on: | |
push: | |
env: | |
REGISTRY: ghcr.io | |
DOCKER_IMAGE_NAME: ghcr.io/JonasKellerer/variation/website | |
defaults: | |
run: | |
working-directory: ./website | |
jobs: | |
checks: | |
name: Website Check format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn | |
uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: | | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('variation/**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Check format | |
run: yarn lint | |
unitTests: | |
name: Website Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn | |
uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: | | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('variation/**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Run tests | |
run: yarn test | |
dockerImage: | |
name: Build Website Docker Image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: dockerMetadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.DOCKER_IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }} | |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
- name: Build and push image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./website | |
push: true | |
tags: ${{ steps.dockerMetadata.outputs.tags }} | |
labels: ${{ steps.dockerMetadata.outputs.labels }} |