Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcandreappel/09cda7a8305be298d89ac9ffd875b14e to your computer and use it in GitHub Desktop.
Save marcandreappel/09cda7a8305be298d89ac9ffd875b14e to your computer and use it in GitHub Desktop.
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