-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (33 loc) · 1 KB
/
build.yaml
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
name: jekyll-cd
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Change diff
run: git --no-pager show -m "$GITHUB_SHA" --color
- name: Install Jekyll
run: |
sudo gem install bundler jekyll
sudo bundle install
bundle exec jekyll -v || exit 1
- name: Clean site
run: |
if [ -d "docs" ]; then
rm -rf docs/*
fi
- name: Build site
run: |
bundle exec jekyll build -d docs
- name: Deploy build
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -am "🧪 Deploy with ${GITHUB_WORKFLOW}"
git --no-pager show --color
git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git