File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,43 @@ Add a step to your workflow that uses this action:
1313
1414Now you can run the ` replicate` CLI in subsequent steps.
1515
16- ` ` ` yaml
17- - name: Generate a haiku
18- run: replicate run meta/llama-2-70b-chat prompt="Write a haiku about llamas"
16+
17+ # # Example: Model CI/CD
18+
19+ Here's an example that pushes a Cog model to Replicate whenever your repo's `main` branch is updated :
20+
21+ ` ` ` yml
22+ name: CI
23+
24+ on:
25+ push:
26+ branches:
27+ - main
28+
29+ jobs:
30+ build:
31+ runs-on: ubuntu-latest
32+ steps:
33+ - name: Check out code
34+ uses: actions/checkout@v3
35+
36+ - name: Setup Cog
37+ uses: replicate/setup-cog@v1
38+ with:
39+ token: ${{ secrets.REPLICATE_API_TOKEN }}
40+
41+ - name: Setup Replicate
42+ uses: replicate/setup-replicate@main
43+ with:
44+ token: ${{ secrets.REPLICATE_API_TOKEN }}
45+
46+ - name: Push the model
47+ run: |
48+ cog push r8.im/zeke/hello-world
49+
50+ - name: Run the model
51+ run: |
52+ cog run zeke/hello-world
1953` ` `
2054
2155# ## Inputs
You can’t perform that action at this time.
0 commit comments