Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fcsonline committed Nov 3, 2023
1 parent f3b2c45 commit 128f0af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ npm i -D @factorialco/gat typescript ts-node commander @swc/core

### Writing a template

The `gat` CLI assumes that your templates are inside `.github/templates`. Let's create our first template:
The `gat` CLI assumes that you have a `index.ts` file inside `.github/templates`. Let's create our first template:

```ts
// .github/templates/my-first-workflow.ts
// .github/templates/index.ts
import { Workflow } from "@factorialco/gat";

new Workflow("My first workflow")
Expand All @@ -39,10 +39,10 @@ new Workflow("My first workflow")
},
],
})
.compile();
.compile('my-first-workflow.yml');
```

Notice that you need to call the `compile()` method at the end.
Notice that you need to call the `compile()` method at the end, passing the file name of the generated Github Actions workflow.

### Compiling your templates

Expand Down
2 changes: 1 addition & 1 deletion src/__snapshots__/workflow.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Workflow > allows a job matrix 1`] = `
"# Workflow automatically generated by gat
Expand Down

0 comments on commit 128f0af

Please sign in to comment.