1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-09 20:21:01 +00:00
faq-de/.github/workflows/cd.yml
Oleg Kainov b3d29d4bb0
Update runners to Ubuntu 22 (#688)
* Update ci.yml

* Update cd.yml

* Update cd.yml

* fix dictionary download

* fix go install
2023-08-22 14:08:24 +02: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-22.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 "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 "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