Skip to content

update plugins, adds mu-plugins dir per patchstack update #41

update plugins, adds mu-plugins dir per patchstack update

update plugins, adds mu-plugins dir per patchstack update #41

Workflow file for this run

# Experimental workflow to test GitHub Actions.
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Production
runs-on: ubuntu-20.04
environment:
name: production
url: https://purpleturtlecreative.com/
steps:
# Download All Code.
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.PTC_GITHUB_PAT }}
# Build Completionist Pro.
- name: Completionist Pro - Build install
working-directory: ./wp-content/plugins/completionist-pro
run: ./build_install.sh
shell: bash
- name: Completionist Pro - Build cleanup
working-directory: ./wp-content/plugins/completionist-pro
run: ./build_cleanup.sh
shell: bash
# Remove unnecessary files and directories.
- name: Clean Up
run: |
find . -name '.git*' -exec rm -rf {} + -depth
find . -type d -empty -delete
# Upload Code to Production.
- name: Sync Code to Production
env:
remote: "github@${{ secrets.PTC_PROD_HOSTNAME }}"
destination: "/var/www/html"
run: |
echo "${{ secrets.PTC_GITHUB_SSH_KEY }}" > deploy_key
chmod 600 ./deploy_key
rsync --recursive --links --checksum --delete \
--exclude-from="./exclude.lst" \
-e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' \
./wp-content ${{ env.remote }}:${{ env.destination }}
ssh -i ./deploy_key -o StrictHostKeyChecking=no ${{ env.remote }} 'chmod -R 775 ${{ env.destination }}/wp-content; chgrp -R www-data ${{ env.destination }}/wp-content' || true