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
50 changes: 50 additions & 0 deletions .github/workflows/wpengine-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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: ./wp-content/themes/beyond
run: npm ci

- name: Build
working-directory: ./wp-content/themes/beyond
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

- 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

- name: Push to WP Engine
uses: epogeedesign/github-action-wpengine-git-deploy@master
env:
WPE_SSH_KEY_PRIVATE: ${{ secrets.WPE_SSH_KEY_PRIVATE }}
WPE_SSH_KEY_PUBLIC: ${{ secrets.WPE_SSH_KEY_PUBLIC }}
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.

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: '_scss',
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