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: SamKirkland/FTP-Deploy-Action@v4.4.0 # with: # # dry-run: true # server: iad1-shared-e1-31.dreamhost.com # port: 22 # protocol: sftp # username: soloweb # password: ${{ secrets.REMOTE_PRIVATE_KEY }} # server-dir: solowebdesigns.net/cwc/wp-content/themes/community-works-collaborative # exclude: | # **/.git* # **/.git*/** # **/.vscode # **/.vscode/** # **/database/** # DOCKER_ENV # docker_tag # output.log # **/vendor/** # **/node_modules/** uses: wlixcc/SFTP-Deploy-Action@v1.2.6 with: username: 'soloweb' server: 'iad1-shared-e1-31.dreamhost.com' ssh_private_key: ${{ secrets.REMOTE_PRIVATE_KEY }} remote_path: 'solowebdesigns.net/cwc/wp-content/themes/community-works-collaborative' sftpArgs: '-o ConnectTimeout=5'