Skip to content

Commit 2789335

Browse files
Improve Readme
1 parent 191eec0 commit 2789335

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,35 @@ jobs:
4646
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4747
```
4848

49-
## Serverless v1.x
50-
Change `serverless/github-action@master` to `serverless/github-action@v1`
49+
## Usage with serverless plugins
50+
Change your action in this way, according to [this issue](https://github.com/serverless/github-action/issues/28), thanks to @matthewpoer:
51+
```yaml
52+
- name: Install Plugin and Deploy
53+
uses: serverless/github-action@v3
54+
with:
55+
args: -c "serverless plugin install --name <plugin-name> && serverless deploy"
56+
entrypoint: /bin/sh
57+
```
58+
59+
## Fix "This command can only be run in a Serverless service directory" error
60+
Change your action in this way, according to [this issue](https://github.com/serverless/github-action/issues/53#issuecomment-1059839383), thanks to @nikhuber:
61+
```yaml
62+
- name: Enter dir and deploy
63+
uses: serverless/github-action@v3
64+
with:
65+
args: -c "cd ./<your-dir> && serverless deploy"
66+
entrypoint: /bin/sh
67+
```
5168
52-
## Serverless v2.x
53-
Change `serverless/github-action@master` to `serverless/github-action@v2`
5469
55-
## Usage with plugins
56-
See example in [this issue](https://github.com/serverless/github-action/issues/28)
70+
## Use serverless v1 or v2
71+
Change the action with one of the following:
72+
```yaml
73+
uses: serverless/github-action@v1
74+
```
75+
```yaml
76+
uses: serverless/github-action@v2
77+
```
5778
5879
5980
## License

0 commit comments

Comments
 (0)