Chore: create initial cd workflow #55
3 changed files with 59 additions and 1 deletions
58
.github/workflows/deploy.yml
vendored
Normal file
58
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
name: Deployment
|
||||||
|
initial deployment, will set up more when we have docker etc... _initial_ deployment, will set up more when we have docker etc...
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
setup:
|
||||||
|
name: Setup
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
outputs:
|
||||||
|
cache-key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Bun Setup
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
with:
|
||||||
|
bun-version-file: '.tool-versions'
|
||||||
|
- name: Restore node_modules
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
id: cache-restore
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/node_modules
|
||||||
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-bun
|
||||||
|
- name: Install
|
||||||
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||||
|
run: bun install
|
||||||
|
- name: Cache node_modules
|
||||||
|
if: steps.cache-restore.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
id: cache-save
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/node_modules
|
||||||
|
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
|
||||||
|
storybook:
|
||||||
|
name: Deploy Storybook
|
||||||
|
needs: [setup]
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Bun Setup
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
with:
|
||||||
|
bun-version-file: '.tool-versions'
|
||||||
|
- name: Restore node_modules
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
id: cache-restore
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
**/node_modules
|
||||||
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||||
|
- name: Build Storybook
|
||||||
|
run: bun build-storybook
|
||||||
2
.github/workflows/pr.yaml
vendored
2
.github/workflows/pr.yaml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
- name: Bun Setup
|
- name: Bun Setup
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version-file: '.tool-versions'
|
||||||
- name: Install
|
- name: Install
|
||||||
run: bun install
|
run: bun install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
|
|
||||||
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
Loading…
Add table
Reference in a new issue
Hmm I wouldn't consider it as a Deployment if it is just publishing on storybook