Skip to content

Commit 992f3fa

Browse files
committed
update
1 parent 2cd8614 commit 992f3fa

File tree

1 file changed

+55
-17
lines changed

1 file changed

+55
-17
lines changed

.github/workflows/main.yml

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,64 @@
1-
name: Jekyll Deploy
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+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
28

39
on:
10+
# Runs on pushes targeting the default branch
411
push:
5-
branches:
6-
- main
12+
branches: ["main"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
728

829
jobs:
9-
build_and_deploy:
30+
# Build job
31+
build:
1032
runs-on: ubuntu-latest
1133
steps:
12-
- name: GitHub Checkout
13-
uses: actions/checkout@v1
14-
- name: Bundler Cache
15-
uses: actions/cache@v1
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
1638
with:
17-
path: vendor/bundle
18-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
19-
restore-keys: |
20-
${{ runner.os }}-gems-
21-
- name: Build & Deploy to GitHub Pages
22-
uses: joshlarsen/jekyll4-deploy-gh-pages@master
39+
ruby-version: '3.1' # Not needed with a .ruby-version file
40+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41+
cache-version: 0 # Increment this number if you need to re-download cached gems
42+
- name: Setup Pages
43+
id: pages
44+
uses: actions/configure-pages@v4
45+
- name: Build with Jekyll
46+
# Outputs to the './_site' directory by default
47+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
2348
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
26-
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
49+
JEKYLL_ENV: production
50+
- name: Upload artifact
51+
# Automatically uploads an artifact from the './_site' directory by default
52+
uses: actions/upload-pages-artifact@v3
53+
54+
# Deployment job
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)