From 550f60c5395acb2500dea0f931dbd08d377c8edb Mon Sep 17 00:00:00 2001 From: Rise Erpelding Date: Mon, 18 Sep 2023 13:31:15 -1000 Subject: [PATCH] chore: workflow to upload theme directory artifact --- .github/workflows/deploy.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2448b12 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: [main] + pull_request: # remove before merging + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install npm dependencies + run: npm ci + + - name: Install PHP dependencies with Composer + uses: php-actions/composer@v6 + with: + php_version: '8.1' + version: 2.x + + # - name: Run tests + # run: npm test + + - name: Build theme + run: npm run build:prod + + - name: Upload theme + uses: actions/upload-artifact@v3 + with: + name: theme-dir + path: theme