Skip to content

Commit 3adc43d

Browse files
docs: fix gitlab pages deploy syntax (#552)
Fix GitLab CI build failure due to invalid syntax.
1 parent 216e129 commit 3adc43d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/guide/deploy.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ deploy:
141141
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:
142142

143143
```yaml
144-
image: node:10.22.0
144+
image: node:16.5.0
145145
pages:
146+
stage: deploy
146147
cache:
147148
paths:
148149
- node_modules/
@@ -152,8 +153,8 @@ pages:
152153
artifacts:
153154
paths:
154155
- public
155-
only:
156-
- main
156+
rules:
157+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
157158
```
158159

159160
## Netlify

0 commit comments

Comments
 (0)