Skip to content

Commit 8cce98c

Browse files
committed
chore: optimize GitHub Actions workflow with Bun setup and improved checkout
- Added Bun setup for bunx commands in extension packages. - Updated checkout steps to fetch only the latest commit and preserve existing files for faster deploys.
1 parent 7c0a3ba commit 8cce98c

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/prod.docs.plus.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,21 @@ jobs:
3838
# This step checks out your repository under $GITHUB_WORKSPACE so your job can access it.
3939
- name: Check out code
4040
uses: actions/checkout@v4
41-
# This step sets up Node.js on the runner and installs the version specified in the matrix above.
41+
with:
42+
# Only fetch the latest commit to minimize checkout time
43+
fetch-depth: 1
44+
# Preserve existing files for faster deploys
45+
clean: false
4246
- name: Set up Node.js
4347
uses: actions/setup-node@v4
4448
with:
4549
node-version: ${{ matrix.node-version }}
50+
51+
# Setup Bun for bunx commands in extension packages
52+
- name: Setup Bun
53+
uses: oven-sh/setup-bun@v2
54+
with:
55+
bun-version: latest
4656
# This step installs project dependencies using Yarn.
4757
# The --frozen-lockfile option ensures the exact package versions specified in yarn.lock are installed.
4858
- name: Install dependencies
@@ -67,6 +77,13 @@ jobs:
6777
# This job will only run if the commit message contains the word 'front'.
6878
if: contains(github.event.head_commit.message, 'front')
6979
steps:
80+
# Checkout code for deployment
81+
- name: Check out code
82+
uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 1
85+
clean: false
86+
7087
# This step runs the build command for the front-end.
7188
- name: Build Front-end
7289
run: make build_front_production
@@ -79,6 +96,13 @@ jobs:
7996
# This job will only run if the commit message contains the word 'back'.
8097
if: contains(github.event.head_commit.message, 'back')
8198
steps:
99+
# Checkout code for deployment
100+
- name: Check out code
101+
uses: actions/checkout@v4
102+
with:
103+
fetch-depth: 1
104+
clean: false
105+
82106
# This step runs the build command for the back-end.
83107
- name: Build Back-end
84108
run: make build_hocuspocus.server_prod

0 commit comments

Comments
 (0)