From 79d88a9311e10e0fdc69b0dbbbf2517dc8701b46 Mon Sep 17 00:00:00 2001 From: Eduard Prigoana Date: Sat, 24 Jan 2026 03:23:13 +0200 Subject: [PATCH] Update GitHub Actions workflow for deployment to use bun --- .github/workflows/deploy.yml | 64 ++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e9c8bfe..9a914b3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,35 +1,49 @@ name: Deploy to GitHub Pages on: - push: - branches: [main] + push: + branches: [main] jobs: - deploy: - runs-on: ubuntu-latest - permissions: - contents: write # Needed to push to the gh-pages branch + deploy: + runs-on: ubuntu-latest + permissions: + contents: write - steps: - - name: Checkout Code - uses: actions/checkout@v3 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 1 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '22' - cache: 'npm' + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest - - name: Install Dependencies - run: npm ci + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ./bun_modules + ./node_modules + ./bun.lock + key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} - - name: Build - run: npm run build + - name: Install dependencies + run: bun install --frozen-lockfile - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist - publish_branch: deployed-ver - force_orphan: true + - name: Build project + run: bun run build --mode production + env: + NODE_ENV: production + BUN_BUILD_THREADS: $(nproc) + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + publish_branch: deployed-ver + force_orphan: true + keep_files: false