Skip to content

Commit 48c9b08

Browse files
Merge branch 'master' into v2
2 parents c7356d3 + 2789335 commit 48c9b08

1 file changed

Lines changed: 30 additions & 3 deletions

File tree

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Welcome, and thanks in advance for your help!
1010

1111
## Usage
1212

13-
An example workflow to deploy a project with serverless:
13+
An example workflow to deploy a project with serverless v3:
1414

1515

1616
```yaml
@@ -46,8 +46,35 @@ jobs:
4646
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4747
```
4848

49-
## Usage with plugins
50-
See example in [this issue](https://github.com/serverless/github-action/issues/28)
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+
```
68+
69+
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+
```
5178
5279
5380
## License

0 commit comments

Comments
 (0)