Last active
May 5, 2023 11:40
-
-
Save joshuacerbito/d51ca1835f637b89528bcb49bf3201b0 to your computer and use it in GitHub Desktop.
Github Action for Flywheel deployment (via ssh) [2023-05-05]
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: Flywheel SSH Deploy | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "8.1" | |
- uses: "ramsey/composer-install@v2" | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
- name: Install npm dependencies | |
run: npm install | |
- name: Run build task | |
run: npm run build --if-present | |
- name: Deploy to Server | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
ARGS: "-rltgoDzvO" | |
EXCLUDE: "/.git/, /.github/, /.hygen/, /node_modules/" | |
TARGET: /www/wp-content/themes/<THEME DIRECTORY>/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment