Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPEngine Site Template #2

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions .deployignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Environment Specific
.github
node_modules
tools
local
auth.json
composer.json
composer.lock
postcss.config.js
gulpfile.js
LICENSE
package.json
package-lock.json
phpcs.xml.dist
phpunit.xml.dist
README.md
renovate.json
webpack.config.js
docker-compose.yml
mu-plugins/tests
.vscode
phpstan.neon.dist
readme.md
DEV-CHECKLIST.md
code_of_conduct.md
# WordPress Specific
wp-config.php
uploads/
blogs.dir/
upgrade/*
backup-db/*
advanced-cache.php
wp-cache-config.php
cache/*
cache/supercache/*
qbd-blocks.zip

# WP Core (as of 4.9.5)
/db-config.php
/index.php
/license.txt
/readme.html
/wp-activate.php
/wp-app.php
/wp-atom.php
/wp-blog-header.php
/wp-comments-post.php
/wp-commentsrss2.php
/wp-config-sample.php
/wp-cron.php
/wp-feed.php
/wp-links-opml.php
/wp-load.php
/wp-login.php
/wp-mail.php
/wp-rdf.php
/wp-rss.php
/wp-rss2.php
/wp-pass.php
/wp-register.php
/wp-settings.php
/wp-signup.php
/wp-trackback.php
/xmlrpc.php
/wp-admin
/wp-includes
/themes/twentyten
/themes/twentyeleven
/themes/twentytwelve
/themes/twentythirteen
/themes/twentyfourteen
/themes/twentyfifteen
/themes/twentysixteen
/themes/twentyseventeen
/themes/twentyeighteen
/themes/twentynineteen
/themes/twentytwenty
/themes/twentytwentyone
/themes/index.php
/plugins/index.php
/plugins/akismet*
/mu-plugins/memcached

# WPEngine Specific
.smushit-status
.gitattributes
_wpeprivate*
object-cache.php
mu-plugins/mu-plugin.php
mu-plugins/slt-force-strong-passwords.php
mu-plugins/stop-long-comments.php
mu-plugins/force-strong-passwords*
mu-plugins/wpengine-common*
mu-plugins/wpe-cache-plugin*
mysql.sql
mu-plugins/wpengine-security-auditor.php
mu-plugins/wpe-wp-sign-on-plugin*
\.hqx$
\.bin$
\.exe$
\.dll$
\.deb$
\.dmg$
\.iso$
\.img$
\.msi$
\.msp$
\.msm$
\.mid$
\.midi$
\.kar$
\.mp3$
\.ogg$
\.m4a$
\.ra$
\.3gpp$
\.3gp$
\.mp4$
\.mpeg$
\.mpg$
\.mov$
\.webm$
\.flv$
\.m4v$
\.mng$
\.asx$
\.asf$
\.wmv$
\.avi$
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Summary


### Jira Ticket
ARE-000

### Testing Instructions with screenshots or screencast (if applicable)
1.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to WP Engine
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install NPM dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npm run release

- name: GitHub Action Deploy to WP Engine Development
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
FLAGS: '-azqr --inplace --delete --exclude=".*" --exclude-from=.deployignore'
WPE_ENV: '${{ secrets.WPE_ENV }}dev'
REMOTE_PATH: "wp-content/"
39 changes: 39 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to WP Engine
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install NPM dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npm run release

- name: GitHub Action Deploy to WP Engine (Production)
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
FLAGS: '-azqr --inplace --delete --exclude=".*" --exclude-from=.deployignore'
WPE_ENV: ${{ secrets.WPE_ENV }}
REMOTE_PATH: "wp-content/"
39 changes: 39 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to WP Engine
on:
push:
branches:
- staging
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install NPM dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npm run release

- name: GitHub Action Deploy to WP Engine Staging
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
FLAGS: '-azqr --inplace --delete --exclude=".*" --exclude-from=.deployignore'
WPE_ENV: '${{ secrets.WPE_ENV }}stg'
REMOTE_PATH: "wp-content/"
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install NPM dependencies
run: npm ci

- name: Install Composer dependencies
run: composer install

- name: Lint
run: npm run lint
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Install NPM dependencies
run: npm ci

- name: Install Composer dependencies
run: composer install

- name: Unit-tests
run: npm run test
Loading