-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (54 loc) · 1.46 KB
/
daily.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
53
54
name: Daily
on:
push:
paths:
- '.github/workflows/daily.yml'
pull_request:
paths:
- '.github/workflows/daily.yml'
schedule:
- cron: 0 0 * * *
jobs:
documents:
name: Documents
runs-on: ubuntu-latest
env:
BUNDLER_GEMFILE: mroonga/docs/Gemfile
steps:
- uses: actions/checkout@v4
with:
path: mroonga.org
- uses: actions/checkout@v4
with:
repository: mroonga/mroonga
path: mroonga
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- name: Install dependencies
run: |
pip install -r mroonga/doc/requirements.txt
- name: Build
run: |
rake -C mroonga \
release:document:update \
MROONGA_ORG_DIR=$PWD/mroonga.org/dev
cd mroonga.org
git add -N dev
if ! git diff --exit-code dev; then
echo "GIT_DIFF=yes" >> ${GITHUB_ENV}
fi
- name: Git push
if: env.GIT_DIFF == 'yes' && github.event_name == 'schedule'
run: |
cd mroonga.org
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dev/docs dev/ja/docs
git commit -m "Update documents for main"
git push origin HEAD:main