diff --git a/.github/workflows/deploy.pantheon.yml b/.github/workflows/deploy.pantheon.git.yml similarity index 96% rename from .github/workflows/deploy.pantheon.yml rename to .github/workflows/deploy.pantheon.git.yml index eb3ceed6..e657ec28 100644 --- a/.github/workflows/deploy.pantheon.yml +++ b/.github/workflows/deploy.pantheon.git.yml @@ -1,4 +1,4 @@ -name: Deploy to Pantheon +name: Deploy to Pantheon (Git) on: push: @@ -7,7 +7,7 @@ on: jobs: deploy: - if: ${{ vars.DEPLOY_TO_PANTHEON }} + if: ${{ vars.DEPLOY_TO_PANTHEON_GIT }} runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/deploy.pantheon.sftp.yml b/.github/workflows/deploy.pantheon.sftp.yml new file mode 100644 index 00000000..961d29fa --- /dev/null +++ b/.github/workflows/deploy.pantheon.sftp.yml @@ -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/terminus-github-actions@1.1.0 + with: + pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }} + + - name: List sites + run: terminus site:list