Skip to content

Commit

Permalink
feat: add a way to zip wordpress files to enhance workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
josephgodwinkimani committed Mar 8, 2024
1 parent df6fea2 commit 7fd3ad5
Show file tree
Hide file tree
Showing 9 changed files with 1,489 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.github export-ignore
18 changes: 18 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"platform": "github",
"timezone": "Africa/Nairobi",
"packageRules": [
{
"updateTypes": ["minor", "patch"],
"automerge": false
}
],
"vulnerabilityAlerts": {
"enabled": true,
"schedule": ["after 9am on Sunday"],
"commitMessagePrefix": "[SECURITY]"
}
}

10 changes: 5 additions & 5 deletions .github/workflows/wordpress-version-checker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: WordPress version checker

name: "WordPress version checker"
on:
push
pull_request
push:
branches:
- master
schedule:
- cron: '0 0 * * 1'

Expand All @@ -14,6 +14,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: WordPress version checker
uses: skaut/wordpress-version-checker@master
uses: skaut/wordpress-version-checker@v1.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
38 changes: 34 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
# Ignore everything in the root except the "wp-content" directory.
!.gitignore
!wp-content/
# Ignore everything in the root directory.
vendor/
wp-admin/
wp-includes/
index.php
license.txt
readme.html
wp-activate.php
wp-blog-header.php
wp-comments-post.php
wp-config-sample.php
wp-config.php
wp-cron.php
wp-links-opml.php
wp-load.php
wp-login.php
wp-mail.php
wp-settings.php
wp-signup.php
wp-trackback.php
xmlrpc.php

# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
# track these files, if they exist
wp-content/*
!wp-content/plugins/
!wp-content/themes/
!wp-content/uploads/
# replace this with the theme you are using
!wp-content/themes/twentytwentyfour/
wp-content/themes/twentytwentythree/
wp-content/themes/twentytwentytwo/
!.gitignore
!.editorconfig
!.phpcs.xml.dist
!README.md
!CHANGELOG.md
!composer.json
!.wordpress-version-checker.json
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
* `local-xdebuginfo.php` is used by LocalWP you can remove it if you opt for other development environments.
[![WPCS check](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wpcs.yml/badge.svg)](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wpcs.yml) [![Deploy with SFTP](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wp-deploy.yml/badge.svg)](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wp-deploy.yml) [![Generate WordPress Archive](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wordpress-build-zip.yml/badge.svg)](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wordpress-build-zip.yml) [![.github/workflows/wordpress-version-checker.yml](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wordpress-version-checker.yml/badge.svg)](https://github.com/josephgodwinkimani/simple-wp-skeleton/actions/workflows/wordpress-version-checker.yml)

* The file `local-xdebuginfo.php` is utilized by LocalWP; should you choose to utilize alternative development environments, you have the option to remove it.

* You have the option to compress the `wp-content/` directory instead of directly committing the files and folders to Git by executing the command `php zip.php`.

* You have the option to utilize the command `composer lint` to assess WordPress code violations within your themes and/or plugins. Please review the `phpcs.xml.dist` file to specify exclusions for themes or plugins that should not undergo scrutiny.
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"require": {
"comodojo/zip": "^2.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.9.0",
"roave/security-advisories": "dev-latest",
"wp-coding-standards/wpcs": "^3.0"
},
"scripts": {
"lint": "phpcs",
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
],
"post-install-cmd": [
"@install-codestandards"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 7fd3ad5

Please sign in to comment.