From eb82f5d9fd9ed9c4b6a252750bcacc472fc67744 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 15 Jan 2025 16:25:26 -0500 Subject: [PATCH 1/2] use .tool-versions file for keeping track of bun version to use --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 4cf52f4..d17b363 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -12,7 +12,7 @@ jobs: - name: Bun Setup uses: oven-sh/setup-bun@v2 with: - bun-version: latest + bun-version-file: '.tool-versions' - name: Install run: bun install - name: Lint -- 2.45.3 From c1f525913c4343f89ffce81cae4a864a1c5f6ccb Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 15 Jan 2025 16:25:37 -0500 Subject: [PATCH 2/2] create deploy workflow --- .github/workflows/deploy.yml | 58 +++++++++++++++++++++++++++++++++++ bun.lockb | Bin 333676 -> 333676 bytes 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..31e2520 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,58 @@ +name: Deployment +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 diff --git a/bun.lockb b/bun.lockb index 45a729fa11db94d6de0c8fd0dece5ca5843b956b..b937057efe7dde302a8202e6eb06c5f42adb9226 100755 GIT binary patch delta 34 qcmaE}PUOuxk%kt=7N#xC-*Y(_;|xvpjP(rK|K~Dq|DVf}yAlBQn+?JM delta 34 lcmaE}PUOuxk%kt=7N#xC-*Y*b7$Bhie=hU(|G6x=D*@o~3_t(? -- 2.45.3