Automatic documentation synchronization. #6
This file contains 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
name: Build and Deploy to Pantheon | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
env: | |
TERMINUS_TOKEN: ${{ secrets.TERMINUS_TOKEN }} | |
CI_BRANCH: ${{ github.head_ref || github.ref_name }} | |
BASE_BRANCH: ${{ github.base_ref }} | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_OWNER: ${{ github.repository_owner }} | |
PRODUCTION_BRANCH: 'main' | |
DEVELOPMENT_BRANCH: 'develop' | |
PR_NUMBER: ${{ github.event.number }} | |
TERMINUS_SITE: 'drupaldocs' | |
jobs: | |
deploy_to_pantheon: | |
name: Deploy to pantheon | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set ownership | |
run: | | |
chown -R $(id -u):$(id -g) $PWD | |
- name: Setup PHP | |
id: setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
- name: Install Terminus | |
uses: pantheon-systems/terminus-github-actions@main | |
with: | |
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }} | |
- name: Install Terminus Build Tools | |
run: | | |
terminus self:plugin:install terminus-build-tools-plugin | |
# Deploy to Pantheon Downstream sites | |
- name: Deploy to Pantheon | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
.github/dev-multidev.sh |