Skip to content
Merged
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
58 changes: 58 additions & 0 deletions .github/workflows/wpengine-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: WP Engine Git Deploy
on:
push:
branches:
- main
- development
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: "14"

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
working-directory: ./
run: npm ci

- name: Build
working-directory: ./
run: npm run build && rm -rf node_modules

- name: Git fetch
run: git fetch --prune --unshallow

- name: Set environment to production
if: endsWith(github.ref, '/main') ## Production Branch name
run: |
echo "WPE_ENVIRONMENT_NAME=${{ secrets.WPE_PROD_ENV_NAME }}" >> $GITHUB_ENV
echo "WPE_LOCAL_BRANCH=main" >> $GITHUB_ENV

- name: Set environment to development
if: endsWith(github.ref, '/development') ## Development Branch Name
run: |
echo "WPE_ENVIRONMENT_NAME=${{ secrets.WPE_DEV_ENV_NAME }}" >> $GITHUB_ENV
echo "WPE_LOCAL_BRANCH=development" >> $GITHUB_ENV

- name: Push to WP Engine
uses: epogeedesign/github-action-wpengine-git-deploy@master
env:
# WPE_ENVIRONMENT_NAME: ${{ secrets.WPE_PROD_ENV_NAME }}
# WPE_ENVIRONMENT_NAME: ${{ secrets.WPE_DEV_ENV_NAME }}
WPE_SSH_KEY_PRIVATE: ${{ secrets.WPE_SSH_KEY_PRIVATE }}
WPE_SSH_KEY_PUBLIC: ${{ secrets.WPE_SSH_KEY_PUBLIC }}
# WPE_ENVIRONMENT: "production"
# WPE_LOCAL_BRANCH: "development"
WPE_GIT_INCLUDE: ".github/wpe-git-include.txt"
WPE_GIT_EXCLUDE: ".github/wpe-git-exclude.txt"
Empty file added .github/wpe-git-exclude.txt
Empty file.
2 changes: 2 additions & 0 deletions .github/wpe-git-include.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
wp-content/themes/beyond/*.css
wp-content/themes/beyond/assets
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Thumbs.db
!deploy.sh
!beyond_parallel_rsa.enc
!config.json
!gulp.config.js
!gulpfile.js
!package.json
!package-lock.json
Expand All @@ -117,4 +118,7 @@ Thumbs.db

wp-content/themes/beyond/.sass-cache
**/.DS_Store
wp-content/themes/beyond/*.css
wp-content/themes/beyond/*.css

# track github actions directory
!.github/
12 changes: 0 additions & 12 deletions .htaccess

This file was deleted.

18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
language: node_js
node_js:
- "stable"
cache: npm
# cache: npm
branches:
only:
- master
- master
addons:
ssh_known_hosts: git.wpengine.com
before_script:
- npm ci
- npm install
script:
- npm run build
before_install:
- openssl aes-256-cbc -K $encrypted_0c3eeb54f1f2_key -iv $encrypted_0c3eeb54f1f2_iv -in beyond_parallel_rsa.enc -out /tmp/beyond_parallel_rsa -d
before_deploy:
- cd $TRAVIS_BUILD_DIR
- cd $TRAVIS_BUILD_DIR
deploy:
- provider: script
skip_cleanup: true
script: chmod +x deploy.sh && sh deploy.sh
on:
branch: master
- provider: script
skip_cleanup: true
script: chmod +x deploy.sh && sh deploy.sh
on:
branch: master
Binary file removed MAMP-PRO-Logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To run:

1. Run `$ npm install` in the root directory
2. Run `$ npm start` to run the development task, which watches the WP theme directory for changes & compiles the SCSS files.
3. Changes to the Gulp tasks can be made by modifying the `config.json`.
3. Changes to the Gulp tasks can be made by modifying the `gulp.config.js`.

To build for production:

Expand Down
72 changes: 72 additions & 0 deletions gulp.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module.exports = {
// Project options.
projectURL: 'https://korea.local', // Local project URL of your already running WordPress site. Could be something like wpgulp.local or localhost:3000 depending upon your local WordPress setup.
productURL: './', // Theme/Plugin URL. Leave it like it is, since our gulpfile.js lives in the root folder.
browserAutoOpen: true,
injectChanges: true,
assets: './assets/',
src: './src',
dest: './dist',
php: './**/*.php',
pluginsJS: './assets/plugins/**/*.js',

port: 8080,

eslintLoader: {
enforce: 'pre',
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
},

imagemin: {
src: '_img',
dest: 'img',
svgoPlugins: [{ removeViewBox: false }],
mozjpeg: {
quality: 85,
progressive: true,
},
optipng: {
optimizationLevel: 5,
interlaced: null,
},
},

js: {
src: '_js',
dest: 'js',
entry: [
'vendor/vendor.js',
'vendor/skip-link-focus-fix.js',
'custom/bundle.js',
],
},

theme_dir: "./wp-content/themes/beyond",

sass: {
src: 'sass',
dest: 'css',
outputStyle: 'compressed',
autoprefixer: {},
mainStyleSheetDest: './',
},

webpack: {
mode: 'production',
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
// optimization: {
// splitChunks: {
// chunks: 'all',
// },
// },
},
}
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require("dotenv").config();
const config = require("./config.json");
const config = require("./gulp.config.js");
const gulp = require("gulp");
const gulpif = require("gulp-if");
const autoprefixer = require("autoprefixer");
Expand Down
Loading