From 018ca3a9aee3e48b6e6d28c4059551e450c6ab6b Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Tue, 16 Jun 2026 18:44:16 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Add=20deployment=20action?= =?UTF-8?q?=20#skipGA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dreamhost.yml | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/dreamhost.yml diff --git a/.github/workflows/dreamhost.yml b/.github/workflows/dreamhost.yml new file mode 100644 index 0000000..157b4a0 --- /dev/null +++ b/.github/workflows/dreamhost.yml @@ -0,0 +1,49 @@ +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: + - uses: actions/checkout@v6 + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v5 + 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 Dreamhost + uses: burnett01/rsync-deployments@v8 + with: + switches: -avzr --delete + remote_path: solowebdesigns.net/cwc/wp-content/themes/community-works-collaborative + remote_host: iad1-shared-e1-31.dreamhost.com + remote_port: 22 + remote_user: soloweb + remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}