Skip to content

Commit

Permalink
Update to standalone actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDickinsonWilde authored Mar 22, 2024
1 parent ce39aeb commit c1bc304
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 155 deletions.

This file was deleted.

27 changes: 0 additions & 27 deletions assets/.github/actions/deploy-pantheon/set-environment

This file was deleted.

81 changes: 0 additions & 81 deletions assets/.github/actions/deploy-pantheon/setup/action.yml

This file was deleted.

41 changes: 9 additions & 32 deletions assets/.github/workflows/deploy-pantheon.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See also https://tu.taoti.com/knowledge-base/github-action-based-pantheon-deploys/

name: Pantheon Deploy
on:
push:
Expand All @@ -12,7 +12,7 @@ on:
- 'alpha'
- 'beta'

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Expand All @@ -21,37 +21,14 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup and Build
uses: taoti/actions-build@main
with:
fetch-depth: 0

- name: Set Variables
env:
SECRET_SITE_NAME: ${{ secrets.PANTHEON_SITE }}
run: ./.github/actions/deploy-pantheon/set-environment

- id: setup-runner
name: Setup Build Environment
uses: ./.github/actions/deploy-pantheon/setup
dir_theme: web/themes/custom/_theme_name_
version_npm: 20.x
- name: Pantheon deploy
uses: taoti/actions-pantheon@main
with:
secret_ssh_key: ${{ secrets.PANTHEON_SSH_KEY }}
secret_terminus_token: ${{ secrets.PANTHEON_TERMINUS_TOKEN }}
secret_site_name: ${{ secrets.PANTHEON_SITE }}

- name: Build Assets
run: composer -n build-assets

- name: Adjust Git SSH Options
run: git config --global core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

- name: Deploy code to Pantheon
run: |
commit_message=$(git log -1 --pretty=%B)
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
terminus build:env:create "${{ secrets.PANTHEON_SITE }}.dev" "$TERMINUS_ENV" --message="${{ github.actor }}: CI Deployment for: $commit_message" --yes
- name: Run Post Deploy Tasks
run: |
terminus -n drush "${{ secrets.PANTHEON_SITE }}.$TERMINUS_ENV" -- deploy -y
terminus -n env:clear-cache "${{ secrets.PANTHEON_SITE }}.$TERMINUS_ENV"
site_name: _site_name_
4 changes: 2 additions & 2 deletions assets/.lando.base.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
recipe: pantheon
config:
framework: drupal9
framework: drupal10
xdebug: false
composer_version: '2-latest'

Expand All @@ -16,7 +16,7 @@ services:
build_as_root:
- mkdir /etc/apt/keyrings && touch /etc/apt/keyrings/nodesource.gpg
- curl -fsSLk https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
- apt-get update && apt-get install -y nodejs
- npm install --global gulp-cli stylelint stylelint-no-browser-hacks stylelint-config-standard stylelint-order
- mkdir -p /root/tmp
Expand Down
2 changes: 1 addition & 1 deletion assets/pantheon.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
api_version: 1
web_docroot: true
php_version: 8.1
php_version: 8.2
database:
version: 10.6
search:
Expand Down

0 comments on commit c1bc304

Please sign in to comment.