Initial commit to github
This commit is contained in:
33
.github/workflows/phpcs.yml
vendored
Normal file
33
.github/workflows/phpcs.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: PHPCS check
|
||||
on:
|
||||
# push:
|
||||
pull_request:
|
||||
# Allow manually triggering the workflow.
|
||||
workflow_dispatch:
|
||||
|
||||
# Cancel all previous workflow runs for the same branch that have not yet completed.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
name: PHPCS
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup PHP
|
||||
uses: "shivammathur/setup-php@v2"
|
||||
with:
|
||||
php-version: "8.2"
|
||||
ini-values: "memory_limit=1G"
|
||||
coverage: none
|
||||
tools: cs2pr
|
||||
- name: Install Composer dependencies
|
||||
uses: "ramsey/composer-install@v3"
|
||||
- name: Run PHPCS checks
|
||||
continue-on-error: true
|
||||
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml .
|
||||
- name: Show PHPCS results in PR
|
||||
run: cs2pr ./phpcs-report.xml
|
||||
26
.github/workflows/todos.yml
vendored
Normal file
26
.github/workflows/todos.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Sync TODOs with Issues
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
sync_todos:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sync TODOs
|
||||
uses: Solo-Web-Works/TODO-Sync@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
summary_file: TODO_SUMMARY.md
|
||||
dry_run: false
|
||||
commit: false
|
||||
65
.github/workflows/wpengine.yml
vendored
Normal file
65
.github/workflows/wpengine.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Deploy to WPEngine
|
||||
on:
|
||||
# workflow_dispatch
|
||||
# Remove "workflow_dispatch" above and uncomment the lines below to enable deploy on push
|
||||
# only do this once you're actually ready to start deploying to Flywheel
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !contains(github.event.head_commit.message, '#skipGA') }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-composer-
|
||||
|
||||
- name: Install PHP Composer
|
||||
uses: php-actions/composer@v6
|
||||
with:
|
||||
php_version: "8.2"
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Run build task
|
||||
run: yarn build
|
||||
|
||||
- name: Clean up node modules (not needed to deploy)
|
||||
run: rm -rf node_modules
|
||||
|
||||
- name: Deploy to WPE
|
||||
uses: wpengine/github-action-wpe-site-deploy@v3
|
||||
with:
|
||||
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
|
||||
WPE_ENV: cupemb
|
||||
FLAGS: '-azvr --inplace --delete --exclude=".*"'
|
||||
REMOTE_PATH: "wp-content/themes/cupe"
|
||||
SCRIPT: "post-deploy.sh"
|
||||
Reference in New Issue
Block a user