Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up SFTP deployment workflow to Pantheon #131

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Pantheon
name: Deploy to Pantheon (Git)

on:
push:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
deploy:
if: ${{ vars.DEPLOY_TO_PANTHEON }}
if: ${{ vars.DEPLOY_TO_PANTHEON_GIT }}
runs-on: ubuntu-latest

strategy:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/deploy.pantheon.sftp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy to Pantheon (SFTP)

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
deploy:
if: ${{ vars.DEPLOY_TO_PANTHEON_SFTP }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install npm dependencies
run: npm ci

- name: Install PHP dependencies with Composer
uses: php-actions/composer@v6
with:
php_version: '8.1'
version: 2.x

- name: Build theme
run: npm run build:prod

- name: Install Terminus
uses: pantheon-systems/[email protected]
with:
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }}

- name: List sites
run: terminus site:list