Skip to content

Commit

Permalink
Fix build by introducing git clean after composer install
Browse files Browse the repository at this point in the history
See #2398
  • Loading branch information
adamwoodnz committed Apr 30, 2024
1 parent 2a59d42 commit 52648de
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,38 @@ jobs:
with:
ref: trunk

- name: Setup
uses: WordPress/wporg-repo-tools/.github/actions/setup@trunk
- name: Install NodeJS
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version-file: ".nvmrc"
cache: "yarn"

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2.25.4
with:
php-version: "7.4"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install php dependencies
shell: bash
run: |
composer install || composer update wporg/*
- name: Git reset and clean
run: |
git reset --hard
git clean -f -d
- name: Setup configs
shell: bash
run: |
yarn setup:tools
- name: yarn install and build
run: |
yarn
yarn build
- name: Trim the repo down to just the source and built files
run: |
Expand Down

0 comments on commit 52648de

Please sign in to comment.