Skip to content

Commit e011061

Browse files
committed
Replaced Travis CI with GitHub Actions workflow.
1 parent e4da639 commit e011061

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/CD.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
- cron: 0 5 * * *
9+
workflow_dispatch:
10+
11+
jobs:
12+
Build:
13+
runs-on: ubuntu-20.04
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: actions/checkout@v2
19+
with:
20+
ref: gh-pages
21+
path: _site
22+
23+
- name: Install dependencies
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: 2.5
27+
bundler-cache: true
28+
29+
- name: Wipe output directory
30+
run: rm -rfv _site/*
31+
32+
- name: Build site
33+
run: bundle exec jekyll b
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
36+
37+
- name: Push site
38+
run: |
39+
git config user.name github-actions
40+
git config user.email [email protected]
41+
git add -A . &&
42+
git commit -m "Built from $GITHUB_SHA." &&
43+
[[ -r CNAME && -r index.html ]] && git push
44+
working-directory: _site

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/.*/
2+
!/.github/
23
/Gemfile.lock
34
/_site/

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ build_url: http://travis-ci.org/ScriptFUSION/Status
55
exclude:
66
- Gemfile
77
- Gemfile.lock
8+
- node_modules
9+
- vendor/bundle/
10+
- vendor/cache/
11+
- vendor/gems/
12+
- vendor/ruby/
813
- README.md

0 commit comments

Comments
 (0)