Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYNC] chore(docs): improve gitlab pages deployment (#4534) #43

Closed
github-actions bot opened this issue Aug 9, 2021 · 0 comments
Closed

[SYNC] chore(docs): improve gitlab pages deployment (#4534) #43

github-actions bot opened this issue Aug 9, 2021 · 0 comments
Labels

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2021

chore(docs): improve gitlab pages deployment (#4534) (7232677)


+++ b/docs/guide/static-deploy.md
@@ -138,24 +138,28 @@ You can also run the above script in your CI setup to enable automatic deploymen
If you are deploying to `https://<USERNAME or GROUP>.gitlab.io/<REPO>/`, for example your repository is at `https://gitlab.com/<USERNAME>/<REPO>`, then set `base` to `'/<REPO>/'`.
-2. Set `build.outDir` in `vite.config.js` to `public`.
-
-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:
+2. 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:
```yaml
-   image: node:10.22.0
+   image: node:16.5.0
pages:
+     stage: deploy
cache:
+       key:
+         files:
+           - package-lock.json
+         prefix: npm
paths:
- node_modules/
script:
- npm install
- npm run build
+       - cp -a dist/. public/
artifacts:
paths:
- public
-     only:
-       - master
+     rules:
+       - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
```
## Netlify
@github-actions github-actions bot added the sync label Aug 9, 2021
Gumball12 added a commit that referenced this issue Feb 13, 2022
Gumball12 added a commit that referenced this issue Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants