storybook deployment
Some checks failed
Deployment / Deploy (push) Failing after 52s

This commit is contained in:
Benjamin Palko 2025-03-30 22:54:24 -04:00
parent c001cc4907
commit 0123adb3b8
2 changed files with 39 additions and 0 deletions

28
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Deployment
on:
push:
branches:
- main
jobs:
svelte-storybook:
name: Deploy ${{ env.GITHUB_REPOSITORY }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_SERVER_URL }}
username: ${{ env.GITHUB_REPOSITORY_OWNER }}
password: ${{ secrets.NPM_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: packages/svelte
file: Dockerfile.storybook
tags: git.palko.ca/${{ env.GITHUB_REPOSITORY }}-svelte-storybook:latest

View file

@ -0,0 +1,11 @@
FROM oven/bun:1.2-alpine AS build
WORKDIR /opt/build
COPY . .
RUN bun install --frozen-lockfile \
&& bun run build-storybook
FROM nginx:alpine3.21
COPY --from=build --chown=1000:1000 /opt/build/storybook-static /usr/share/nginx/html