Skip to content

Commit

Permalink
add a getting started section to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed May 29, 2023
1 parent 844ca5b commit d9f4540
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,41 @@ An action to build an npm package and push its contents to a branch.
after the `pack` command. It will not work as expected with any others in the
directory.

## Getting started

To use this action you can create a new workflow and copy the following into it:

```yaml
# .github/workflows/push-dist.yml

name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm run build # Add whatever you need to build your pacakage here
- uses: kategengler/[email protected]
with:
branch: ${{ github.head_ref || github.ref_name }}-dist
token: ${{ secrets.GITHUB_TOKEN }}
```
If you're working with a fork and you want to publish your work for testing you can update the workflow to build on all pushes to all branches:
```yaml
on:
push: {}
```
## Inputs
### `token` (required)
Expand Down

0 comments on commit d9f4540

Please sign in to comment.