1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-26 04:12:18 +00:00
faq-de/.github/workflows/cd.yml

38 lines
1.2 KiB
YAML
Raw Normal View History

name: Continuous delivery
on:
push:
branches:
- master
jobs:
sort_dictionary:
if: github.repository == 'ru-de/faq'
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Sort dictionary
run: |
git config --global user.email "actions@github.com"
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 "dictionary rearrangement" && git push; fi
update_github_pages:
if: github.repository == 'ru-de/faq'
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Update github pages
run: |
git config --global user.email "actions@github.com"
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