.github/workflows: copy all the files from docs folder to wiki and github pages

This commit is contained in:
Aliaksandr Valialkin 2020-03-30 15:05:37 +03:00
parent 0f2dd77a76
commit 8d35af6fdb
2 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@ name: github-pages
on: on:
push: push:
paths: paths:
- 'docs/*.md' - 'docs/*'
- 'README.md' - 'README.md'
branches: branches:
- master - master
@ -17,14 +17,14 @@ jobs:
TOKEN: ${{secrets.CI_TOKEN}} TOKEN: ${{secrets.CI_TOKEN}}
run: | run: |
git clone https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git gpages git clone https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git gpages
cp docs/*.md gpages cp docs/* gpages
cp README.md gpages cp README.md gpages
cd gpages cd gpages
git config --local user.email "info@victoriametrics.com" git config --local user.email "info@victoriametrics.com"
git config --local user.name "Vika" git config --local user.name "Vika"
git add "*.md" git add .
git commit -m "update github pages" git commit -m "update github pages"
remote_repo="https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git" remote_repo="https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git"
git push "${remote_repo}" git push "${remote_repo}"
cd .. cd ..
rm -rf gpages rm -rf gpages

View File

@ -2,7 +2,7 @@ name: wiki
on: on:
push: push:
paths: paths:
- 'docs/*.md' - 'docs/*'
branches: branches:
- master - master
jobs: jobs:
@ -17,13 +17,13 @@ jobs:
run: | run: |
cd docs cd docs
git clone https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.wiki.git wiki git clone https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.wiki.git wiki
find ./ -name '*.md' -exec cp -prv '{}' 'wiki' ';' find ./ -name '*' -exec cp -prv '{}' 'wiki' ';'
cd wiki cd wiki
git config --local user.email "info@victoriametrics.com" git config --local user.email "info@victoriametrics.com"
git config --local user.name "Vika" git config --local user.name "Vika"
git add "*.md" git add .
git commit -m "update wiki pages" git commit -m "update wiki pages"
remote_repo="https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.wiki.git" remote_repo="https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.wiki.git"
git push "${remote_repo}" git push "${remote_repo}"
cd .. cd ..
rm -rf wiki rm -rf wiki