-
-
Save dsebao/14b46ab9eeedaaac1a5529cc5d460de5 to your computer and use it in GitHub Desktop.
Github Action for deploying a WordPress plugin
This file contains hidden or 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 Plugin | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install NPM dependencies & Compile assets for production | |
run: | | |
npm install | |
npm run prod | |
- name: List output files | |
run: ls | |
- name: Deploy to Production Server #1 | |
uses: easingthemes/[email protected] | |
env: | |
# To generate a new key: | |
# ssh-keygen -a 100 -t ed25519 | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE }} | |
REMOTE_HOST: ${{ secrets.SSH_HOST }} | |
REMOTE_USER: ${{ secrets.SSH_USER }} | |
ARGS: -rltgoDzvO --exclude .git --exclude .github --exclude node_modules --exclude src --exclude cypress | |
TARGET: /www/wp-content/plugins/{plugin_dir} | |
- name: Deploy to Production Server #2 | |
uses: easingthemes/[email protected] | |
env: | |
# To generate a new key: | |
# ssh-keygen -a 100 -t ed25519 | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE }} | |
REMOTE_HOST: ${{ secrets.SSH_HOST_2 }} | |
REMOTE_USER: ${{ secrets.SSH_USER_2 }} | |
ARGS: -rltgoDzvO --exclude .git --exclude .github --exclude node_modules --exclude src --exclude cypress | |
TARGET: /www/wp-content/plugins/{plugin_dir} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment