Skip to content

Pantheon Refresh Training Environment #8

Pantheon Refresh Training Environment

Pantheon Refresh Training Environment #8

name: Pantheon Refresh Training Environment
on:
workflow_dispatch:
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ vars.PHP_VERSION }}
- name: Add SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.PANTHEON_SSH_PRIVATE_KEY }}
- name: Disable Pantheon SSH strict host key checking
run: 'printf "\nHost *\n\tStrictHostKeyChecking no" >> ~/.ssh/config'
- name: Install Terminus
uses: pantheon-systems/terminus-github-actions@main
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
- name: Mirror the latest code from master into the training environment
run: |
git clone -o pantheon -b master ${{ vars.PANTHEON_GIT_REMOTE }} ./
git push -f pantheon master:training
- name: Refresh the training environment from live without files
run: terminus env:clone-content ${{ vars.PANTHEON_SITE }}.live training --yes --db-only