cache purge on deploy #6
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: Build and Publish Production Theme | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
FTP-Deploy-Action: | ||
name: FTP-Deploy-Action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12.x" | ||
- name: Build Project | ||
run: | | ||
npm install --quiet | ||
npm run production | ||
- name: List output files | ||
run: ls | ||
- name: Deploy to Server | ||
uses: easingthemes/ssh-deploy@v2.1.5 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE }} | ||
REMOTE_HOST: 34.174.186.154 | ||
REMOTE_USER: motherhoodcommunityv2 | ||
REMOTE_PORT: 14140 | ||
ARGS: -rltgoDzvO --exclude .git --exclude .github --exclude node_modules | ||
TARGET: /www/motherhoodcommunityv2_167/public/wp-content/themes/motherhoodcommunity-v2 | ||
# Runs a single command using the runners shell | ||
- name: Webhook | ||
uses: joelwmale/webhook-action@2.1.0 | ||
with: | ||
url: "https://motherhoodcommunity.com/super-secret-cache-reset" | ||
body: '{}' | ||
headers: '{}' |