-
Notifications
You must be signed in to change notification settings - Fork 278
52 lines (45 loc) · 1.25 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test & Deploy
on:
push:
branches:
- main
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: ☑️ Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
#with:
# bundler-cache: true
- name: 🧪 Install gems
run: |
cd ./docs
bundle install
- name: 🔧 Build & Test
run: |
cd ./docs
JEKYLL_ENV=production bundle exec jekyll build
bundle exec rake upsert_data_by_readme
bundle exec rake test
- name: 🚀 Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
cd ./docs
if [ -n "$(git status en ja --porcelain)" ]; then
git config --global user.name "Yohei Yasukawa"
git config --global user.email "yohei@yasslab.jp"
git checkout main
git add en ja
git commit -m '🤖 Generate page(s) by README'
git push origin main
fi