-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (48 loc) · 1.25 KB
/
.gitlab-ci.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
stages:
- docs
- build
- deploy
generate_docs:
image: python:3.6
stage: docs
script:
- apt-get update -q -y
- pip install -r requirements.txt
- python3 boostNote2Md.py
artifacts:
paths:
- docs
expire_in: 1 week
gitlabPages:
image: node:9.11.1
stage: build
cache:
paths:
- node_modules/
script:
- yarn install
- yarn docs:build
- mv docs/.vuepress/dist public
- ls
- echo "Highly unlikely their is gitlab pages, because I am using gitlab for CI/CD"
artifacts:
paths:
- public
expire_in: 1 week
only:
- master
githubPages:
stage: deploy
script:
- cd public
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
- sed -i '6i <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2479144310234386" crossorigin="anonymous"></script>' **/*.html
- git init
- git add -A
- git config user.email "$GITHUB_EMAIL"
- git config --global user.name "$GITHUB_USERNAME"
- git commit -m "Build from $CI_SERVER_NAME $CI_PIPELINE_ID"
- git push -f https://$GITHUB_USERNAME:$GITHUB_ACCESS_TOKEN@github.com/$GITHUB_USERNAME/$CI_PROJECT_NAME.git master:gh-pages
only:
- master