Skip to content

Commit 98765db

Browse files
committed
Enhance Jekyll workflow; optimize dependency installation and add artifact upload step
Signed-off-by: DavidOsipov <[email protected]>
1 parent 72ea384 commit 98765db

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ permissions:
1717
jobs:
1818
build:
1919
runs-on: ubuntu-latest
20-
2120
steps:
2221
- name: Checkout code
2322
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
@@ -31,13 +30,14 @@ jobs:
3130
- name: Install dependencies
3231
run: |
3332
gem install bundler
34-
bundle install
33+
bundle install --jobs 4 --retry 3
3534
working-directory: ./site
3635

3736
- name: Install Node.js
3837
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
3938
with:
4039
node-version: 22.14.0
40+
cache: 'npm'
4141

4242
- name: Install Wrangler
4343
run: npm install -g wrangler
@@ -46,6 +46,32 @@ jobs:
4646
run: |
4747
bundle exec jekyll build --source $GITHUB_WORKSPACE --destination $GITHUB_WORKSPACE/site/build --config $GITHUB_WORKSPACE/site/_config.yml
4848
working-directory: ./site
49+
50+
- name: Upload build artifacts
51+
uses: actions/upload-artifact@v3
52+
with:
53+
name: site-build
54+
path: site/build
55+
56+
deploy:
57+
needs: build
58+
runs-on: ubuntu-latest
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
60+
steps:
61+
- name: Download build artifacts
62+
uses: actions/download-artifact@v3
63+
with:
64+
name: site-build
65+
path: site/build
66+
67+
- name: Install Node.js
68+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
69+
with:
70+
node-version: 22.14.0
71+
cache: 'npm'
72+
73+
- name: Install Wrangler
74+
run: npm install -g wrangler
4975

5076
- name: Publish
5177
uses: cloudflare/[email protected]

0 commit comments

Comments
 (0)