-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a getting started section to readme
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
|