-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.33 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy GitHub Pages
on:
push:
branches:
- main # Change this to your default branch if different
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive # Ensure submodules are updated
- name: Setup Ruby for Jekyll
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1 # Specify the Ruby version you want to use
- name: Install dependencies for Jekyll blog
working-directory: ./blog # Change directory to blog
run: |
gem install bundler
bundle install
- name: Build Jekyll blog
working-directory: ./blog # Change directory to blog
run: bundle exec jekyll build -d ../build_output/blog
- name: Copy static HTML site
run: |
mkdir -p build_output
rsync -av --exclude='build_output' --exclude='blog' --exclude='.git' --exclude='.github' . build_output/
- name: Create .nojekyll file
run: echo '' > build_output/.nojekyll
- name: List build_output directory contents for debugging
run: ls -R build_output
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build_output