From 82260ac309384d186633ccb1b6531709442285c5 Mon Sep 17 00:00:00 2001 From: Mohan Raj Date: Mon, 19 Feb 2024 18:42:39 +0000 Subject: [PATCH] new build step --- .deployignore | 19 ++++++++++++++++++- .github/workflows/plugin-build.yml | 13 +++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.deployignore b/.deployignore index b6df817..4fbc11f 100644 --- a/.deployignore +++ b/.deployignore @@ -1,6 +1,6 @@ .gitignore composer.lock -phpcs.xml* +phpcs.xml .babelrc .env.dist .editorconfig @@ -12,3 +12,20 @@ docker-compose.yml docker test_results node_modules +.DS_Store +.husky +jest-setup.js +jest.config.js +local +phpmd.xml.dist +phpstan.neon.dist +phpunit-integration-multisite.xml +phpunit-integration.xml +phpunit.xml +playwright.config.ts +tsconfig.json +.nvmrc +types +tests +src +bin diff --git a/.github/workflows/plugin-build.yml b/.github/workflows/plugin-build.yml index 538517c..a326068 100644 --- a/.github/workflows/plugin-build.yml +++ b/.github/workflows/plugin-build.yml @@ -39,12 +39,17 @@ jobs: - name: JS build run: yarn build + - name: Apply deployignore + run: | + FILE=.deployignore + if [ -f "$FILE" ]; then + cat .deployignore | xargs rm -rf + fi + - name: Create and push built branch run: | - git checkout -b main-built + git checkout main-built git add -A # Stage all changes, including untracked files - git rm --cached -r .husky || true - git rm --cached -r node_modules || true git ls-files --ignored --exclude-standard -o -z | xargs -0 git rm --cached # Remove ignored files from the index - git commit -m "Built WordPress plugin" + git commit -m "Built WordPress plugin" --no-verify git push origin main-built