Use public release of kjblocks #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build release | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Build JS dependencies | |
run: | | |
npm --prefix _dev install | |
npm --prefix _dev run build | |
- name: Install dependencies | |
run: composer install --no-dev | |
- name: Save header-stamp asset before cleaning | |
run: cp ./_dev/header-stamp/afl.txt $RUNNER_TEMP/afl.txt | |
- name: Clean-up project | |
uses: PrestaShopCorp/github-action-clean-before-deploy@v1.0 | |
- name: Prepare auto-index tool | |
run: composer global require prestashop/autoindex | |
- name: Prepare header-stamp tool | |
run: composer global require prestashop/header-stamp | |
- name: Generate index.php | |
run: ~/.composer/vendor/bin/autoindex | |
- name: Generate header stamps | |
run: ~/.composer/vendor/bin/header-stamp --extensions=php,js,css,scss,tpl,html.twig,vue --exclude=vendor,node_modules --license=$RUNNER_TEMP/afl.txt | |
- name: Fix unnecessary spacing in index files | |
run: find . -name "index.php" -type f -exec sed -i 'N;/^\n$/d' {} + | |
- name: Create and upload artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: ../ | |