1
0
mirror of https://github.com/ru-de/faq.git synced 2024-09-19 19:41:28 +00:00
faq-de/.github/workflows/update_github_pages.yml
Evgeniy Sokolov 50488f0282
Github actions instead travis for master push (#571)
* test github action

* add repo filter to protect forks

* add repo filter to protect forks

* test commit

* fetch

* depth 100

* sort dictionary

* sort dict

* dictionary rearrangement

* sort dict

* dictionary rearrangement

* add update gh-pages on github actions

* move update on master push from travis to gh actions

* right exit code

* test

* drop test

* drop unused

* go is not required

Co-authored-by: Github Actions <actions@github.com>
2020-11-12 00:03:31 +01:00

25 lines
722 B
YAML

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