Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
stages:
- build
- deploy
build:
stage: build
tags:
- <tag you provided while registering the token>
- <second tag>
script:
- echo "Building deploy package"
- yarn install
- yarn build
- echo "Build successful"
artifacts:
expire_in: 1 hour
paths:
- build
deploy_production:
stage: deploy
tags:
- <tag you provided while registering the token>
- <second tag>
script:
- echo "Deploying to server"
- cp -rv build/* /var/www/html/<destination_folder>/
- echo "Deployed"
environment:
name: production
url: <your deployment url>
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment