Created
February 6, 2020 21:01
-
-
Save mngyuan/638fa1f858cbb3645943c8c4266e01e3 to your computer and use it in GitHub Desktop.
Gitlab CI config for nextjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:alpine | |
# Cache node modules - speeds up future builds | |
cache: | |
paths: | |
- node_modules | |
pages: | |
stage: deploy | |
script: | |
- npm install | |
- npm run build | |
- npm run export | |
- mv public _public # nextjs reserves the public folder, but so does gitlab | |
- mv out public | |
artifacts: | |
paths: | |
- public | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment