-
Notifications
You must be signed in to change notification settings - Fork 386
37 lines (35 loc) · 1.23 KB
/
cd.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: Continuous delivery
on:
push:
branches:
- master
jobs:
sort_dictionary:
if: github.repository == 'ru-de/faq'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Sort dictionary
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
LC_ALL=ru_RU.UTF8 sort files/ci/dictionary.dic -o files/ci/dictionary.dic -f
if ! git diff HEAD --quiet; then git commit -q -am "re-order dictionary" && git push; fi
update_github_pages:
if: github.repository == 'ru-de/faq'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Update github pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin gh-pages
git checkout gh-pages
bash update.sh > /dev/null 2>&1
git add pages
if ! git diff HEAD --quiet; then git commit -q -am "sync github pages" && git push; fi