File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed 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.
6
6
after the ` pack ` command. It will not work as expected with any others in the
7
7
directory.
8
8
9
+ ## Getting started
10
+
11
+ To use this action you can create a new workflow and copy the following into it:
12
+
13
+ ``` yaml
14
+ # .github/workflows/push-dist.yml
15
+
16
+ name : Push dist
17
+
18
+ on :
19
+ push :
20
+ branches :
21
+ - main
22
+ - master
23
+
24
+ jobs :
25
+ push-dist :
26
+ name : Push dist
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v3
30
+ - run : npm run build # Add whatever you need to build your pacakage here
31
+ -
uses :
kategengler/[email protected]
32
+ with :
33
+ branch : ${{ github.head_ref || github.ref_name }}-dist
34
+ token : ${{ secrets.GITHUB_TOKEN }}
35
+ ` ` `
36
+
37
+ 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:
38
+
39
+ ` ` ` yaml
40
+ on :
41
+ push : {}
42
+ ` ` `
43
+
9
44
## Inputs
10
45
11
46
### ` token` (required)
You can’t perform that action at this time.
0 commit comments