-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.79 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: C++ CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: setup
run: |
export GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
bash setup.sh
working-directory: ./.github/workflows
- name: make coverage
run: |
make coverage
pushd build
export CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
bash <(curl -s https://codecov.io/bash)
popd
- name: make docs
run: |
make doc
- name: push docs
run: |
git clone -b gh-pages https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git /tmp/gh-pages
docdir="$PWD/docs/html/"
pushd /tmp/gh-pages
git config --global user.email "[email protected]"
git config --global user.name "Vladimir Migashko"
rsync -arv --update $docdir ./
git add --all
COMMIT_MESSAGE="Update pages on $(date +'%Y-%m-%d %H:%M:%S')"
git diff-index --quiet --cached HEAD -- && echo "No changes!" && exit 0 || echo $COMMIT_MESSAGE
git commit -m "${COMMIT_MESSAGE}"
git push https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git gh-pages:gh-pages
popd
- name: push tag
run: |
git pull --tags --force https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo " tag=$tag"
git config --global user.email "[email protected]"
git config --global user.name "Vladimir Migashko"
git tag --force -a $tag -m "update from github actions"
git push --force --tags https://${{ secrets.ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git HEAD:master