forked from alexshikov/devcenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitrise.yml
More file actions
115 lines (111 loc) · 3.19 KB
/
bitrise.yml
File metadata and controls
115 lines (111 loc) · 3.19 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
format_version: 3
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
description: |
Official guides: http://www.mkdocs.org
workflows:
ci:
before_run:
- setup
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
mkdocs build
deploy-to-github-pages:
before_run:
- setup
envs:
- DEVCENTER_CNAME_URL: devcenter.bitrise.io
steps:
- script:
description: |
Note: mkdocs builds into `./site/`
Official GitHub Pages deploy guide: https://help.github.com/articles/creating-project-pages-manually/
*You can find infos about how to initialize the required `gh-pages` branch
in the official guide.*
inputs:
- content: |-
#!/bin/bash
set -ex
rm -rf ./site
REPO_URL=$(git remote get-url origin)
git clone --branch gh-pages "$REPO_URL" ./site
mkdocs build --clean
cd site/
# github pages - cname file
echo "$DEVCENTER_CNAME_URL" > CNAME
# timestamp - so that we always have a git change
date > build-date.log
#
git config --global user.email "letsconnect@bitrise.io"
git config --global user.name "Bitrise Bot"
git add .
git commit -m 'deploy - [skip ci] for gh-pages branch'
git push origin gh-pages
generate-api-docs:
steps:
- script@1.1.4:
title: gen api docs
deps:
brew:
- name: go
apt_get:
- name: golang
bin_name: go
inputs:
- content: |-
#!/bin/bash
set -ex
# generate gotgen config
go run _scripts/gen_api_docs_gotgen_config.go
# move it into docs/api
api_docs_dir_pth="./docs/api"
mv ./gg.conf.json "${api_docs_dir_pth}/gg.conf.json"
# run gotgen there
go get -u -v github.com/bitrise-tools/gotgen
cd "${api_docs_dir_pth}"
gotgen generate
setup:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
if [[ "$(uname)" == "Linux" ]] ; then
sudo apt-get update
fi
- script:
deps:
brew:
- name: python
bin_name: pip
apt_get:
- name: python-pip
- name: python-dev
- name: build-essential
inputs:
- content: |
#!/bin/bash
set -ex
sudocmd=""
if [[ "$(uname)" == "Linux" ]] ; then
sudocmd="sudo"
fi
# On Linux, with apt installed python / python-pip
# these commands have to be performed with `sudo`!
${sudocmd} pip install --upgrade pip
${sudocmd} pip install --upgrade virtualenv
${sudocmd} pip install -r requirements.txt
mkdocs --version
pip show mkdocs-material
up:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
mkdocs serve