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
Evgeniy Sokolov 9788ccd5e1
Github Actions for checks (#574)
* github actions ci

* github actions ci

* github actions ci

* github actions ci

* github actions ci

* github actions ci

* no deprecation

* debug

* debug

* debug

* fix

* fix

* fix

* fix

* fix

* forgotten files

* fix

* fix

* fix

* fix

* oganize everything related to ci in one folder

* add check

* fix path

* get changed files

* try this env

* expected codes file moved

* test check

* test check

* test check

* docker for local test ci and fix dict download

* local setup and some updates

* rollback

* right email
2020-11-12 23:42:25 +01:00

38 lines
1.2 KiB
YAML

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