Skip to content

Commit 63f792f

Browse files
author
Sonu Kumar
committed
update action
1 parent c6fdab4 commit 63f792f

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.github/workflows/pages.yaml

+19-15
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ on:
1010
# Runs on pushes targeting the default branch
1111
push:
1212
branches: [ $default-branch ]
13+
paths:
14+
- "docs/**"
1315
pull_request:
1416
branches: [ 'main', '2.x' ]
1517
types: [ opened ]
18+
paths:
19+
- "docs/**"
1620

1721
# Allows you to run this workflow manually from the Actions tab
1822
workflow_dispatch:
@@ -33,6 +37,9 @@ jobs:
3337
# Build and Deploy job
3438
build_and_deploy:
3539
runs-on: ubuntu-latest
40+
defaults:
41+
run:
42+
working-directory: docs
3643
steps:
3744
- name: Checkout
3845
uses: actions/checkout@v4
@@ -42,32 +49,29 @@ jobs:
4249
ruby-version: '3.1' # Not needed with a .ruby-version file
4350
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4451
cache-version: 0 # Increment this number if you need to re-download cached gems
52+
working-directory: '${{ github.workspace }}/docs'
53+
- name: Setup Pages
54+
id: pages
55+
uses: actions/configure-pages@v5
4556
- name: Bundle install in docs folder
46-
run: |
47-
cd docs
48-
bundle install
57+
run: bundle install
4958
- name: Build Jekyll site
50-
run: |
51-
cd docs
52-
bundle exec jekyll build --baseurl /rqueue
53-
mkdir -p _site # Ensure _site directory exists
59+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
5460
env:
5561
JEKYLL_ENV: production
56-
- name: Verify _site directory
57-
run: |
58-
cd docs
59-
ls -l _site
6062
- name: Upload artifact
6163
# Automatically uploads an artifact from the './_site' directory by default
6264
uses: actions/upload-artifact@v2
6365
with:
6466
name: Jekyll site
65-
path: docs/_site
67+
path: "docs/_site"
6668
- name: Deploy to GitHub Pages
67-
uses: JamesIves/github-pages-deploy-[email protected] # Replace with the appropriate deploy action
69+
uses: actions/deploy-pages@v4
6870
with:
6971
branch: $default-branch
70-
folder: docs/_site
72+
folder: "docs/_site"
7173
env:
7274
JEKYLL_ENV: production
73-
BASE_URL: /rqueue
75+
BASE_URL: /rqueue
76+
name: github-pages
77+
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)