✨feature: Add Dreamhost deployment action
Sync TODOs with Issues / sync_todos (push) Successful in 6s
Sync TODOs with Issues / sync_todos (push) Successful in 6s
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Deploy to Dreamhost (dev)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Remove "workflow_dispatch" above and uncomment the lines below to enable deploy on push
|
||||
# only do this once you're actually ready to start deploying to Dreamhost
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.head_commit.message, '#skipGA') }}
|
||||
|
||||
steps:
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install rsync
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/setup-node@v6
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run build task
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to Dreamhost
|
||||
uses: SamKirkland/web-deploy@v1
|
||||
with:
|
||||
target-server: iad1-shared-e1-31.dreamhost.com
|
||||
ssh-port: 22
|
||||
remote-user: zarathos
|
||||
private-ssh-key: ${{ secrets.REMOTE_PRIVATE_KEY }}
|
||||
destination-path: work.keithsolomon.net/wp-content/themes/portfolio-2026
|
||||
rsync-options: --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=.vscode/ --exclude=database/ --exclude=.gitignore --exclude=DOCKER_ENV --exclude=docker_tag --exclude=output.log --exclude=vendor/ --exclude=node_modules/ --exclude=notes/ --exclude=docs/
|
||||
@@ -1,64 +0,0 @@
|
||||
name: Deploy to WPEngine
|
||||
on:
|
||||
workflow_dispatch
|
||||
# Remove "workflow_dispatch" above and uncomment the lines below to enable deploy on push
|
||||
# only do this once you're actually ready to start deploying to Flywheel
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.head_commit.message, '#skipGA') }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install PHP Composer
|
||||
uses: php-actions/composer@v6
|
||||
with:
|
||||
php_version: "8.2"
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run build task
|
||||
run: npm run build
|
||||
|
||||
- name: Clean up node modules (not needed to deploy)
|
||||
run: rm -rf node_modules
|
||||
|
||||
- name: Deploy to WPE
|
||||
uses: wpengine/github-action-wpe-site-deploy@v3
|
||||
with:
|
||||
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
|
||||
WPE_ENV: <change-me>
|
||||
FLAGS: '-azvr --inplace --delete --exclude=".*"'
|
||||
REMOTE_PATH: "wp-content/themes/<change-me>"
|
||||
Reference in New Issue
Block a user