mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
update docs when merging to master
This commit is contained in:
parent
da6deff199
commit
018e151e1f
2 changed files with 38 additions and 0 deletions
|
|
@ -36,6 +36,17 @@ jobs:
|
|||
paths:
|
||||
- ~/.cache/go-build
|
||||
|
||||
update-docs:
|
||||
docker:
|
||||
- image: circleci/golang:1.12
|
||||
working_directory: /go/src/github.com/jesseduffield/lazydocker
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Update docs
|
||||
command: |
|
||||
./.circleci/update_docs.sh
|
||||
|
||||
release:
|
||||
docker:
|
||||
- image: circleci/golang:1.12
|
||||
|
|
@ -66,6 +77,11 @@ workflows:
|
|||
build:
|
||||
jobs:
|
||||
- build
|
||||
- update-docs:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
release:
|
||||
jobs:
|
||||
- release:
|
||||
|
|
|
|||
22
.circleci/update_docs.sh
Executable file
22
.circleci/update_docs.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# see if we have a new cheatsheet
|
||||
# if other docs end up being generated automatically we can chuck in the relevant scripts here
|
||||
go run scripts/generate_cheatsheet.go
|
||||
|
||||
# commit and push if we have a change
|
||||
if [[ -z $(git status -s -- docs/*) ]]; then
|
||||
echo "no changes to commit in the docs directory"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "committing updated docs"
|
||||
|
||||
git config user.name "lazydocker bot"
|
||||
git config user.email "jessedduffield@gmail.com"
|
||||
|
||||
git add docs/*
|
||||
git commit -m "update docs"
|
||||
git push -u origin HEAD
|
||||
Loading…
Add table
Reference in a new issue