# Spinning Up New Projects
Use this guide to start all new projects in Tandem. I could also be used to massage existing code bases into our workflow as well.
# 1. Choose a start state
This is a base Drupal 8 start state. It integrates all our testing, utilizes a composer workflow, and integrates with platform.sh. Utilize this start state if you want a to build a completely custom site from the ground up.
This is similar to the Drupal 8 Template above, but uses the Minimis Distribution. This start state is typical for most small to medium sized projects.
This is similar to the Drupal 8 Template above, but uses the Contenta CMS Distribution. Utilize this start state only if you are building a decoupled Drupal 8 site.
# 2. Create a new repo
# 3. Record the new repo
Add the new repo to the list of current projects.
# 4. Spin up platform.sh site
- Contact Alec Reynolds to spin up a small site on platform.sh.
- Only Alec has the powers to do this.
# 5. Spin up site locally
- Change the name of the site in .lando.base.yml
- Change the project ids in .lando.base.yml to match your platform.sh project id.
# 6. Integrate with platform.sh
Add the platform.sh git repo as a remote in your local. You can grab the git repo from the dashboard of your project. The run the following commands:
git remote add platform PLATFORMID@git.us.platform.sh:PLATFORMID.git git push platform master git remote remove platform
lando platformto login to the platform.sh cli
Generate a GitHub user token.
Integrate GitHub with platform.sh via (obviously change the variables):
lando platform integration:add \ --type=github \ --project=PROJECT_ID \ --token=GITHUB-USER-TOKEN \ --repository=USER/REPOSITORY \ --build-pull-requests=true \ --fetch-branches=true
lando pullto pull the site on platform.sh locally into yours.
# 6. Platform.sh variables
In your local repo, create a .env file and add the token like:
In the platform.sh settings add the variable with the token
- The url should be something like https://console.platform.sh/USER_NAME/PLATFORM_ID/settings/variables where you add it. Don't add it to the master branch settings.
# 7. Setup Travis
Connect the repo to travis if it isn't already.