Skip to content

Instantly share code, notes, and snippets.

@d8vjork
Last active March 12, 2021 15:13
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 d8vjork/20865badd6f24311188b80fc1d269840 to your computer and use it in GitHub Desktop.
Save d8vjork/20865badd6f24311188b80fc1d269840 to your computer and use it in GitHub Desktop.
stages:
- build
- deploy
yarn_install:
stage: build
cache:
key: "${CI_PROJECT_ID}_yarn"
policy: pull-push
paths:
- .yarn/cache
- node_modules
artifacts:
expire_in: 30 mins
paths:
- node_modules
image: node:lts-alpine
before_script:
# Some optional Yarn config...
- yarn config set scripts-prepend-node-path auto
- yarn config set ignore-scripts true
- yarn config set ignore-optional true
script:
- yarn install --prefer-offline --frozen-lockfile --no-progress --check-files --ignore-engines
deploy:
stage: deploy
dependencies:
- yarn_install
image: <Your PHP with NodeJS Docker image here>
script:
- php vendor/bin/vapor deploy ${VAPOR_ENVIRONMENT} --commit="${CI_COMMIT_SHA}" --message="${CI_COMMIT_MESSAGE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment