From af5165f6b818850bed3f421bda3a78450c6fd75a Mon Sep 17 00:00:00 2001 From: Mohan Raj Date: Mon, 19 Feb 2024 15:58:10 +0000 Subject: [PATCH] new workflow for build --- .deployignore | 14 +++++++++++++ .github/workflows/plugin-build.yml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .deployignore create mode 100644 .github/workflows/plugin-build.yml diff --git a/.deployignore b/.deployignore new file mode 100644 index 0000000..b6df817 --- /dev/null +++ b/.deployignore @@ -0,0 +1,14 @@ +.gitignore +composer.lock +phpcs.xml* +.babelrc +.env.dist +.editorconfig +.eslintrc +.prettierrc.js +.wp-env.json +webpack.config.js +docker-compose.yml +docker +test_results +node_modules diff --git a/.github/workflows/plugin-build.yml b/.github/workflows/plugin-build.yml new file mode 100644 index 0000000..edd8939 --- /dev/null +++ b/.github/workflows/plugin-build.yml @@ -0,0 +1,32 @@ +name: Build WordPress Plugin + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + + - name: Setup PHP with tools + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + tools: composer:v2 + + - name: Install dependencies + run: composer install --no-dev -o + + - name: Deploy to main-built branch + run: bash <(curl -s "https://raw.githubusercontent.com/Automattic/vip-go-build/master/deploy.sh")