diff --git a/.github/workflows/sort_dictionary.yml b/.github/workflows/sort_dictionary.yml new file mode 100644 index 0000000..87d9692 --- /dev/null +++ b/.github/workflows/sort_dictionary.yml @@ -0,0 +1,21 @@ +name: Sort dictionary + +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 + run: | + git config --global user.email "actions@github.com" + git config --global user.name "Github Actions" + LC_ALL=ru_RU.UTF8 sort files/dictionary.dic -o files/dictionary.dic -f + if ! git diff HEAD --quiet; then git commit -q -am "dictionary rearrangement" && git push; fi diff --git a/.github/workflows/update_github_pages.yml b/.github/workflows/update_github_pages.yml new file mode 100644 index 0000000..175cc8d --- /dev/null +++ b/.github/workflows/update_github_pages.yml @@ -0,0 +1,24 @@ +name: Update github pages + +on: + push: + branches: + - master + +jobs: + 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 + 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 diff --git a/.travis.yml b/.travis.yml index 6d17287..98d04ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,6 @@ install: - sudo env PATH=$PATH GOPATH=$GOPATH bash files/check-install.sh script: - - git branch ci_pull_request - - bash files/run_on_master.sh - - git checkout ci_pull_request - bash files/check.sh notifications: diff --git a/files/dictionary.dic b/files/dictionary.dic index f3606d8..b7c1a12 100644 --- a/files/dictionary.dic +++ b/files/dictionary.dic @@ -1,3 +1,6 @@ +-го +-м +-му 500Mb Abbiegespur ALG @@ -37,11 +40,11 @@ juris Karersee Karl-Marx-Str Keplerstr -kleiderspende Kleiderspende +kleiderspende Kottbusser -Kübler KVR +Kübler Lichtenberg Lieferando Linevych @@ -51,15 +54,15 @@ mehrspurigem Mierendorffplatz Misurina Multivisa -Müritz Mutterschaftsgeld +Müritz Natan Nicolaistraße Niederlassungserlaubnis Pankower PayPal -pdf PDF +pdf Pichelsdorferstr Popov popsure @@ -101,44 +104,70 @@ Wientjes Wittenbergplatz wowa yandex +АБХ Аахен Аахене -АБХ -агрегатор Агрегаторы +Апостилировать +Блед +ВНЖ +Вадуц +Галлен +Готард +ДКП +Карлс +Крумлов +Линдау +Липно +Лоукостеры +Маастрихт +Мбит +НДФЛ +ОВД +ОСАГО +ПВД +ПДД +ПИН +ПМЖ +ПТС +Пассау +ПриватБанк +РСЦ +Райффайзен +Рафтинг +Розенталер +Ротенбург +Сard. +Семёна +України +ФОП +Хостелы +агрегатор апостилизации апостилизация апостилированного апостилированную -Апостилировать апостилях апостилях бан банкинг банкинга -більше -Блед бюргерамт бюргерамта бюргерамтах бюргерамте бюргерамту бюргерамты -Вадуц +більше веб-сайт виданого -відомостями -ВНЖ встречки -Галлен --го -Готард +відомостями громадянина дає держави державі дино -ДКП довідку дозволу документантами @@ -146,71 +175,44 @@ yandex заповнену зарплатные зарплатных -іноземній -Карлс картку компетентними консульський копію -Крумлов -Линдау -Липно лоукостеров -Лоукостеры лоукосты лэндлорды --м -Маастрихт малус -Мбит мониторят --му мульти написами -НДФЛ невозврата немецкоговорящим ніж облік облікову -ОВД оригінал -ОСАГО офлайн оффер оффера офферов паспортний -Пассау -ПВД -ПДД перебуває -ПИН -ПМЖ подачі подкасты постоплата -ПриватБанк приоритизируют провизион проживання промо протухания пруф -ПТС -Райффайзен распечать -Рафтинг репутационные -Розенталер розміром -Ротенбург роутер роутеры -РСЦ -Сard. свежеотремонтированная -Семёна сторінок тикет тимчасово @@ -218,10 +220,8 @@ yandex торрентов тусить украино -України фишинг фишингом -ФОП фотокартку фрилансером фрилансеры @@ -232,8 +232,8 @@ yandex хайков хайку хак -Хостелы цій ывро явника який +іноземній diff --git a/files/run_on_master.sh b/files/run_on_master.sh deleted file mode 100644 index 0bb8f28..0000000 --- a/files/run_on_master.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -set -e - -skip() { - echo "$@" 1>&2 - exit 0 -} - - -[ "${TRAVIS_COMMIT_MESSAGE}" == "${TRAVIS_COMMIT_MESSAGE/Travis #/}" ] || \ - skip "Skipped... because this is travis autocommit." - -[ "${TRAVIS_PULL_REQUEST}" = "false" ] || \ - skip "Skipped... because this is pull request." - -[ "${TRAVIS_BRANCH}" = "master" ] || \ - skip "Skipped... because this is not a master branch (current: ${TRAVIS_BRANCH})." - -[ "${TRAVIS_REPO_SLUG}" = "ru-de/faq" ] || \ - skip "Skipped... because this is not an original repository (current: ${TRAVIS_REPO_SLUG})." - -[ "${GH_TOKEN+set}" = set ] || \ - skip "Skipped... GitHub access token not available" - -git config --global user.email "travis@travis-ci.org" -git config --global user.name "Travis CI" - -git remote add upstream https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git > /dev/null 2>&1 -git fetch upstream --depth=3 -q -git checkout upstream/master -q - -LC_ALL=ru_RU.UTF8 sort files/dictionary.dic -o files/dictionary.dic -f - -if ! git diff --quiet; then - git commit -q -am "Travis #$TRAVIS_BUILD_NUMBER: dictionary rearrangement" - git push -q upstream HEAD:master - echo "Dictionary was rearranged" -fi - -git checkout upstream/gh-pages -bash update.sh > /dev/null 2>&1 -git add pages - -if ! git diff HEAD --quiet; then - git commit -q -am "Travis #$TRAVIS_BUILD_NUMBER: sync github pages" - git push -q upstream HEAD:gh-pages - echo "Github pages was updated" -fi