-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add doc publishing to ci * Enable github doc publishing in ci * Add vendor to gitignore directory * Update publish doc * Update doc publish job on ci * Run doc publishing on main branch only * Add convenience job for setting github branch protection rules
- Loading branch information
Showing
3 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ version: 2.1 | |
orbs: | ||
ruby: circleci/[email protected] | ||
|
||
executors: | ||
app-ruby: | ||
docker: | ||
- image: cimg/ruby:2.7 | ||
|
||
commands: | ||
run-tests: | ||
|
@@ -14,33 +18,83 @@ commands: | |
steps: | ||
- run: bundle exec rake standard | ||
|
||
run-docs-build: | ||
description: Generate docs | ||
steps: | ||
- run: bundle exec rake doc:build | ||
|
||
run-docs-publish: | ||
description: Update gh-pages | ||
steps: | ||
- run: | | ||
git checkout gh-pages | ||
cp -R doc/* . | ||
git commit -vam 'Update documentation' | ||
git push origin gh-pages | ||
jobs: | ||
test: | ||
executor: app-ruby | ||
parameters: | ||
ruby_version: | ||
type: string | ||
gemfile: | ||
type: string | ||
docker: | ||
- image: 'cimg/ruby:<< parameters.ruby_version >>' | ||
steps: | ||
- checkout | ||
- ruby/install-deps: | ||
gemfile: <<parameters.gemfile>> | ||
- run-tests | ||
|
||
# Convenience job for setting github branch protection rules | ||
test-matrix: | ||
executor: app-ruby | ||
steps: | ||
- checkout | ||
- run: echo "Done" | ||
|
||
lint: | ||
docker: | ||
- image: cimg/ruby:2.7 | ||
executor: app-ruby | ||
steps: | ||
- checkout | ||
- ruby/install-deps | ||
- run-lint | ||
|
||
build-docs: | ||
executor: app-ruby | ||
steps: | ||
- checkout | ||
- ruby/install-deps | ||
- run-docs-build | ||
- persist_to_workspace: | ||
root: . | ||
paths: doc | ||
|
||
publish-docs: | ||
executor: app-ruby | ||
steps: | ||
- checkout | ||
- ruby/install-deps | ||
- attach_workspace: | ||
at: . | ||
- add_ssh_keys: | ||
fingerprints: # ssh key generated solely for montrose docs | ||
- "97:43:0c:36:36:1d:83:30:f0:76:d4:9f:d3:71:a8:a5" | ||
- run: | ||
name: Configure git | ||
command: | | ||
git config user.email "[email protected]" | ||
git config user.name "ci-build" | ||
- run-docs-publish | ||
|
||
workflows: | ||
all-tests: | ||
jobs: | ||
- lint | ||
- build-docs | ||
- test-matrix: | ||
requires: | ||
- test | ||
- test: | ||
matrix: | ||
parameters: | ||
|
@@ -55,3 +109,11 @@ workflows: | |
exclude: | ||
- ruby_version: '2.6' | ||
gemfile: gemfiles/activesupport_7.0.gemfile | ||
- publish-docs: | ||
requires: | ||
- lint | ||
- build-docs | ||
- test-matrix | ||
filters: | ||
branches: | ||
only: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
/profile.log | ||
/trace.txt | ||
/.ruby-gemset | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters