Skip to content

fix: bind ref to ScrollArea.Root for proper scrolling functionality #1188

fix: bind ref to ScrollArea.Root for proper scrolling functionality

fix: bind ref to ScrollArea.Root for proper scrolling functionality #1188

Workflow file for this run

name: Website
on:
push:
paths: ["src/**", "Dockerfile", ".github/workflows/website.yml"]
workflow_dispatch:
env:
CONTAINER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
SERVER_API_URL: cupcake.shiiyu.moe
SHORT_SHA: 0000000
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
if: |
(github.ref == 'refs/heads/prod' || github.ref == 'refs/heads/dev')
&& github.repository_owner == 'SkyCryptWebsite'
&& github.event_name != 'pull_request'
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: javascript-typescript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
formatting-checks:
name: Check linting (es-lint), formatting (prettier), and svelte checks (svelte-check)
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v5
- name: PNPM Install
uses: ./.github/actions/pnpm-install
- name: Make dummy env for types
run: |
echo "ls -a ."
ls -a .
mv .env.example .env
- name: Check linting, formatting, and svelte checks
run: pnpm lint
build:
name: Vite Build
runs-on: ubuntu-latest
if: |
(github.ref == 'refs/heads/prod' || github.ref == 'refs/heads/dev')
&& github.repository_owner == 'SkyCryptWebsite'
&& github.event_name != 'pull_request'
steps:
- name: Git checkout
uses: actions/checkout@v5
- name: PNPM Install
uses: ./.github/actions/pnpm-install
- name: Re-assign server API URL if prod
if: github.ref == 'refs/heads/prod'
run: echo "SERVER_API_URL=sky.shiiyu.moe" >> $GITHUB_ENV
- name: Make dummy env for types
run: |
echo "ls -a ."
ls -a .
mv .env.example .env
- name: Vite Build
run: pnpm run build
env:
PUBLIC_SERVER_API_URL: https://${{ env.SERVER_API_URL }}/api/
SERVER_API_TOKEN: ${{ secrets.SERVER_API_TOKEN }}
package:
name: Package into Container
runs-on: ubuntu-latest
needs: [analyze, formatting-checks, build]
permissions:
packages: write
contents: read
id-token: write
attestations: write
steps:
- name: Git checkout
uses: actions/checkout@v5
- name: Assign short SHA
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Re-assign server API URL if prod
if: github.ref == 'refs/heads/prod'
run: echo "SERVER_API_URL=sky.shiiyu.moe" >> $GITHUB_ENV
- name: Registry login
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and Push
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
build-args: |
PUBLIC_COMMIT_HASH=${{ env.SHORT_SHA }}
PUBLIC_SERVER_API_URL=https://${{ env.SERVER_API_URL }}/api/
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{ env.CONTAINER_REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
# release:
# name: Create Release
# runs-on: ubuntu-latest
# needs: [package]
# permissions:
# contents: write
# steps:
# - name: Git checkout
# uses: actions/checkout@v5
# - name: Configure Git
# run: |
# git config --global user.name "github-actions[bot]"
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
# - name: PNPM Install
# uses: ./.github/actions/pnpm-install
# - name: Create Prerelease (dev branch)
# if: github.ref == 'refs/heads/dev'
# run: pnpm run release --versionSuffix=dev
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Release (prod branch)
# if: github.ref == 'refs/heads/prod'
# run: pnpm run release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Sync GitHub Release
# run: pnpm dlx changelogen gh release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}