⬆️ Upgrade actions/checkout digest to eef6144 (#629) #596
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: Deploy to Live | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 | |
with: | |
php-version: '8.2' | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: composer install --no-dev --no-interaction | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4 | |
with: | |
node-version: 20.x | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install Yarn dependencies | |
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5 | |
with: | |
cmd: install | |
- name: Build production bundle | |
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5 | |
with: | |
cmd: build | |
- name: Commit and push local changes | |
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 | |
with: | |
commit_message: 🍱 Apply theme changes | |
deploy: | |
needs: prepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd einstein | |
git pull | |
php82 /usr/bin/composer install --no-dev -d ${PWD} |