diff --git a/.github/workflows/create-dev-build-branch.yml b/.github/workflows/create-dev-build-branch.yml new file mode 100644 index 000000000..b4167a400 --- /dev/null +++ b/.github/workflows/create-dev-build-branch.yml @@ -0,0 +1,36 @@ +name: Create build branch from development + +on: + push: + branches: [ development ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.3' + - uses: actions/setup-node@v1 + - name: Build PatternLab + run: | + git remote update + git fetch + git checkout --track origin/build/development + git checkout development + git branch -d build/development + git checkout -b build/development + composer install + git checkout -- . + npm install + npm run build + - name: Push to build branch + run: | + git config user.email "github-actions@github.com" + git config user.name "Github Actions" + sed -i '/public/d' ./.gitignore + git add --all + git commit -m 'Generated build from development' + git push -f origin build/development diff --git a/.gitignore b/.gitignore index c5e6c8b45..890269683 100644 --- a/.gitignore +++ b/.gitignore @@ -8,14 +8,5 @@ vendor/ # Directory generated by and containing the pattern library build public/* -# In the public directory, track just the compiled asset files -# because those are being consumed by an external party that does -# not currently build the pattern library -!public/css -!public/fonts -!public/js -!public/img -!public/images - # PHP helper functions for Twig. Generated by Pattern Lab # source/_twig-components/