...
Code Block | ||
---|---|---|
| ||
version: 2.1
workflows:
version: 2
build_and_test:
jobs:
- pantheon/push:
checkout: false
clone_content: false
pre-steps:
- checkout
- restore_cache:
name: Restore Node Cache
keys:
- drupal-node-{{"package-lock.json" }}
# Fallback to most recent build if this exact config hasn't been installed before.
- drupal-node-
# Restore composer packages if they have been previously downloaded and cached.
- restore_cache:
name: Restore Composer Cache
keys:
- drupal-composer-v1-{{ checksum "composer.lock" }}
# Fallback to most recent build if this exact config hasn't been installed before.
- drupal-composer-v1-
- run: composer -n install --optimize-autoloader --ignore-platform-reqs --no-dev
- run:
name: Prepare gitignore
command: |
rm .gitignore
mv .gitignore-deploy .gitignore
- run: composer prepare-for-pantheon
# Install node modules and build theme.
- run:
name: Node Install
command: npm it
# Cache node_modules so the packages don't need to be redownloaded next time.
- save_cache:
name: Save Node Cache
key: drupal-node-{{ checksum "package-lock.json" }}
paths:
- node_modules
# Cache composer so the packages don't need to be redownloaded next time.
- save_cache:
name: Save Composer Cache
key: drupal-composer-v1-{{ checksum "composer.lock" }}
paths:
- ~/.composer/cache
filters:
branches:
only:
- master
- pantheon/push:
checkout: false
terminus_clone_env: "dev"
pre-steps:
- checkout
- restore_cache:
name: Restore Node Cache
keys:
- drupal-node-{{ checksum "package-lock.json" }}
# Fallback to most recent build if this exact config hasn't been installed before.
- drupal-node-
# Restore composer packages if they have been previously downloaded and cached.
- restore_cache:
name: Restore Composer Cache
keys:
- drupal-composer-v1-{{ checksum "composer.lock" }}
# Fallback to most recent build if this exact config hasn't been installed before.
- drupal-composer-v1-
- run: composer -n install --optimize-autoloader --ignore-platform-reqs --no-dev
- run: composer prepare-for-pantheon
- run:
name: Node Install
command: npm it
# Cache node_modules so the packages don't need to be redownloaded next time.
- save_cache:
name: Save Node Cache
key: drupal-node-{{ checksum "package-lock.json" }}
paths:
- node_modules
# Cache composer so the packages don't need to be redownloaded next time.
- save_cache:
name: Save Composer Cache
key: drupal-composer-v1-{{ checksum "composer.lock" }}
paths:
- ~/.composer/cache
filters:
branches:
ignore:
- master
orbs:
pantheon: pantheon-systems/pantheon@0.5.1
|
...