Skip to content

Commit bcf887f

Browse files
committed
fix deploy
1 parent f19b538 commit bcf887f

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

.github/workflows/build-jekyll.yml

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
1-
name: Build and Deploy to Github Pages
1+
name: Build and Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches:
6-
- master # Here source code branch is `master`, it could be other branch
5+
branches: [ master ]
6+
7+
permissions:
8+
contents: write
9+
pages: write
10+
id-token: write
711

812
jobs:
913
build_and_deploy:
1014
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
1315

14-
# Use GitHub Actions' cache to cache dependencies on servers
15-
- uses: actions/cache@v4
16-
with:
17-
path: |
18-
.asdf/**
19-
vendor/bundle
20-
key: ${{ runner.os }}-cache-${{ hashFiles('**/cache.key') }}
21-
restore-keys: |
22-
${{ runner.os }}-cache-
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
2319

20+
# Python only if you need to run the glossary script
2421
- name: Set up Python
25-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2623
with:
27-
python-version: '3.8'
24+
python-version: '3.12'
2825

2926
- name: Generate Glossary
30-
run: python scripts/generate_glossary.py
27+
run: |
28+
python -m pip install --upgrade pip
29+
# pip install -r scripts/requirements.txt # if you have one
30+
python scripts/generate_glossary.py
3131
32-
# Use GitHub Deploy Action to build and deploy to Github
33-
# For latest version: `jeffreytse/jekyll-deploy-action@master`
34-
- uses: jeffreytse/jekyll-deploy-action@v0.6.0
32+
# Use GitHub's official Pages build/deploy (fast, maintained)
33+
- name: Setup Ruby
34+
uses: ruby/setup-ruby@v1
3535
with:
36-
provider: 'github' # Default is github
37-
token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT)
38-
ssh_private_key: '' # It's your SSH private key (SSH approach)
39-
repository: '' # Default is current repository
40-
branch: 'gh-pages' # Default is gh-pages for github provider
41-
jekyll_src: './' # Default is root directory
42-
jekyll_cfg: '_config.yml' # Default is _config.yml
43-
jekyll_baseurl: '' # Default is according to _config.yml
44-
ruby_ver: '' # Default is 3.2.0 version
45-
bundler_ver: '' # Default is compatible bundler version (~>2.5.0)
46-
cname: '' # Default is to not use a cname
47-
actor: '' # Default is the GITHUB_ACTOR
48-
pre_build_commands: '' # Installing additional dependencies (Arch Linux)
36+
ruby-version: '3.2'
37+
bundler-cache: true
38+
39+
- name: Build site with Jekyll
40+
run: |
41+
bundle install
42+
bundle exec jekyll build --trace --destination _site
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: _site
48+
49+
- name: Deploy to GitHub Pages
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)