Created
March 23, 2018 19:24
-
-
Save sean-e-dietrich/4b6c0d9323fd04857c09866ab59e96c1 to your computer and use it in GitHub Desktop.
CircleCI config.yml file
This file contains hidden or 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
# PHP CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-php/ for more details | |
# | |
defaults: &defaults | |
docker: | |
- image: circleci/php:5.6-apache-node-browsers | |
working_directory: ~/repo | |
version: 2 | |
jobs: | |
build: | |
<<: *defaults | |
steps: | |
- checkout | |
- persist_to_workspace: | |
root: ~/ | |
paths: | |
- repo | |
deploy_stage: | |
<<: *defaults | |
steps: | |
- attach_workspace: | |
at: ~/ | |
- run: | |
name: Deploying to Staging | |
command: ./.circleci/deploy STG | |
deploy_prod: | |
<<: *defaults | |
steps: | |
- attach_workspace: | |
at: ~/ | |
- run: | |
name: Deploying to Production | |
command: ./.circleci/deploy PROD | |
workflows: | |
version: 2 | |
build-n-deploy: | |
jobs: | |
- build | |
- deploy_stage: | |
requires: | |
- build | |
filters: | |
branches: | |
only: master | |
- deploy_prod: | |
requires: | |
- build | |
filters: | |
branches: | |
ignore: /.*/ | |
tags: | |
only: /^prod-.*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment