Skip to content

Commit

Permalink
docs(sync): resolve #43
Browse files Browse the repository at this point in the history
  • Loading branch information
Gumball12 committed Aug 13, 2021
1 parent 021c727 commit fa80247
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions guide/static-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,24 +143,28 @@ $ npm run preview

만약 `https://<USERNAME or GROUP>.gitlab.io/<REPO>/`와 같은 형태로 배포하고자 한다면, `base` 설정 값을 `'/<REPO>/'`로 지정해주세요.

2. `vite.config.js` 파일의 `build.outDir` 값을 `public`으로 설정해주세요.

3. 아래와 같은 내용으로 프로젝트의 루트에 `.gitlab-ci.yml` 파일을 생성해주세요. 이와 같이 설정하게 되면, 콘텐츠가 변경될 때마다 사이트가 빌드 및 배포됩니다.
2. 아래와 같은 내용으로 프로젝트의 루트에 `.gitlab-ci.yml` 파일을 생성해주세요. 이와 같이 설정하게 되면, 콘텐츠가 변경될 때마다 사이트가 빌드 및 배포됩니다.

```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 {#netlify}
Expand Down

0 comments on commit fa80247

Please sign in to comment.