forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.12 KB
/
ci.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
name: Beautiful Jekyll CI
on: [push, pull_request]
jobs:
build:
name: Build Jekyll
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the site in the jekyll/builder container
run: |
export JEKYLL_VERSION=3.8
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
-e PAGES_REPO_NWO=${{ github.repository }} \
jekyll/builder:$JEKYLL_VERSION /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
deploy:
needs: build
name: Deploy GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6"
- run: gem install bundler -v 2.4.22
- run: bundle install --jobs 4 --retry 3
- run: bundle exec jekyll build --destination site
env:
JEKYLL_ENV: production
- name: Deploy to master
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: master
FOLDER: site
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}