diff --git a/.github/workflows/upload-release.yml b/.github/workflows/upload-release.yml new file mode 100644 index 0000000..a7ea9fe --- /dev/null +++ b/.github/workflows/upload-release.yml @@ -0,0 +1,44 @@ +name: build and release + +on: + release: + types: [published] + +jobs: + tag: + name: 🚛 Build and release + runs-on: ubuntu-latest + + steps: + - name: 🕶️ Checkout repository + uses: actions/checkout@v3 + + - name: 🤮 Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8 + coverage: none + extensions: mbstring, intl + tools: composer:v2 + + - name: 📦 Download dependencies + run: | + composer install --no-dev --optimize-autoloader + + - name: 🗃️ Create artifact + run: | + mkdir theme-build + composer archive -vvv --format=zip --file="theme-build/betheme-wordpress-headless-theme" + + - name: 🚛 Upload artifact + uses: actions/upload-artifact@v3 + with: + name: betheme-wordpress-headless-theme + path: theme-build/betheme-wordpress-headless-theme.zip + + - name: 🚀 Upload release asset + uses: softprops/action-gh-release@v1 + with: + files: theme-build/betheme-wordpress-headless-theme.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 8d06b70..f1e7561 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ yarn-error.log* # deployment .vercel +theme-build/ # wordpress wp-cli.local.yml diff --git a/composer.json b/composer.json index 8197320..c5d472e 100644 --- a/composer.json +++ b/composer.json @@ -22,11 +22,32 @@ "squizlabs/php_codesniffer": "^3.7" }, "require": { - "phpcompatibility/phpcompatibility-wp": "^2.1" + "phpcompatibility/phpcompatibility-wp": "^2.1", + "php": ">=8" }, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true - } + }, + "platform": { + "php": "8" + }, + "process-timeout": 0, + "optimize-autoloader": true + }, + "archive": { + "name": "betheme-wordpress-headless-theme", + "exclude": [ + "/.*", + "!.wordpress-org", + "!vendor", + "theme-build", + "node_modules", + "/composer.json", + "/composer.lock", + "/package.json", + "/package-lock.json", + "/phpcs.xml" + ] } } diff --git a/composer.lock b/composer.lock index 8c60764..d318033 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "597acc8190a53a7eb14e217b046387c7", + "content-hash": "7642ebdb835c44af715bcce6ac59405a", "packages": [ { "name": "phpcompatibility/php-compatibility", @@ -485,7 +485,12 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">=8" + }, "platform-dev": [], + "platform-overrides": { + "php": "8" + }, "plugin-api-version": "2.3.0" } diff --git a/readme.txt b/readme.txt index cfbaefa..f628f83 100644 --- a/readme.txt +++ b/readme.txt @@ -23,6 +23,12 @@ Designed to work perfectly with [WPGraphQL BeBuilder](https://github.com/Nordcom Initially based on [@nordcom/wordpress-headless-theme](https://github.com/NordcomInc/wordpress-headless-theme). +== NOTE == + +This is a theme for a __headless__ WordPress setup, the point +of it is to disable the frontend except for post/page previews and +if you're using the embeding feature during migration. + == Changelog == = 0.1.0 = diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..33041e1 Binary files /dev/null and b/screenshot.png differ