Skip to content

Commit

Permalink
ref/ci (#195)
Browse files Browse the repository at this point in the history
casperdcl authored Mar 4, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1349b3a commit f37b44d
Showing 2 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions content/docs/ref/ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Command Reference: `ci`

```bash
cml ci [options]
```

Prepares Git repository for CML operations (setting Git `user.name` &
`user.email`, unshallow clone and undo CI oddities such as origin URL formatting
and HTTP remote proxies).

## Options

Any [generic option](/doc/ref).

## Examples

Instead of wrangling with
[unshallowing clones](https://stackoverflow.com/q/6802145) and
`git config user.email` before being able to `git commit` or use
[`cml pr`](/doc/ref/pr), simply run:

```bash
cml ci
```
4 changes: 3 additions & 1 deletion content/docs/ref/pr.md
Original file line number Diff line number Diff line change
@@ -45,7 +45,9 @@ jobs:
- name: Generate data
run: echo "Hello World" > output.txt
- name: Create and merge PR
run: gh pr merge --rebase $(cml pr "output.txt")
run: |
cml ci
gh pr merge --rebase $(cml pr "output.txt")
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

0 comments on commit f37b44d

Please sign in to comment.