File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Deploy Jekyll Site from /docs
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' docs/**' # This correctly triggers the workflow only when docs changes
9+ workflow_dispatch :
10+
11+ jobs :
12+ build_and_deploy :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : ' 2.7.1' # Or your Jekyll's required Ruby version
22+ bundler-cache : true
23+ # Set the cache path to be relative to the docs directory
24+ cache-version : 1
25+ working-directory : ' ./docs'
26+
27+ - name : Build the site
28+ # This command now runs inside the ./docs directory
29+ run : bundle exec jekyll build
30+ working-directory : ./docs
31+
32+ - name : Deploy to GitHub Pages
33+ uses : peaceiris/actions-gh-pages@v3
34+ with :
35+ github_token : ${{ secrets.GITHUB_TOKEN }}
36+ # The publish directory is now ./docs/_site
37+ publish_dir : ./docs/_site
You can’t perform that action at this time.
0 commit comments