Skip to content

Commit 493452b

Browse files
authored
Updates configure-pages action to v2, other minor updates (just-the-docs#10)
Copying over changes from [starter workflow](https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml), which include: - upgrading the `configure-pages` action to v2, which removes the set-output command (closes just-the-docs#8) - pinning the ruby setup version - minor documentation nits Separately, probably need to do a better job of documenting this in the main README (see: just-the-docs#6).
1 parent 88e466d commit 493452b

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

‎.github/workflows/pages.yml‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
16
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
27
name: Deploy Jekyll site to Pages
38

49
on:
510
# Runs on pushes targeting the default branch
611
push:
7-
branches: ["main"]
12+
branches: [$default-branch]
813

914
# Allows you to run this workflow manually from the Actions tab
1015
workflow_dispatch:
@@ -28,17 +33,22 @@ jobs:
2833
- name: Checkout
2934
uses: actions/checkout@v3
3035
- name: Setup Ruby
31-
uses: ruby/setup-ruby@v1
36+
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3
3237
with:
3338
ruby-version: '3.0' # Not needed with a .ruby-version file
3439
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3540
cache-version: 0 # Increment this number if you need to re-download cached gems
3641
- name: Setup Pages
3742
id: pages
38-
uses: actions/configure-pages@v1
39-
- run: bundle exec jekyll build --baseurl ${{ steps.pages.outputs.base_path }} # defaults output to '/_site'
43+
uses: actions/configure-pages@v2
44+
- name: Build with Jekyll
45+
# Outputs to the './_site' directory by default
46+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
47+
env:
48+
JEKYLL_ENV: production
4049
- name: Upload artifact
41-
uses: actions/upload-pages-artifact@v1 # This will automatically upload an artifact from the '/_site' directory
50+
# Automatically uploads an artifact from the './_site' directory by default
51+
uses: actions/upload-pages-artifact@v1
4252

4353
# Deployment job
4454
deploy:

0 commit comments

Comments
 (0)