Fix: Conversion banner layout spacing in WP admin [TMZ-1083] #2387
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| build_plugin: | |
| name: Build theme | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| pull-requests: write | |
| outputs: | |
| artifact_name: hello-elementor | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-node-modules | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Set environment variables | |
| run: | | |
| DATE_VERSION=$(date '+%Y%m%d.%H%M') | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| THEME_ZIP_FILENAME="hello-elementor.${PACKAGE_VERSION}.zip" | |
| echo "DATE_VERSION=$DATE_VERSION" >> "$GITHUB_ENV" | |
| echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV" | |
| echo "THEME_ZIP_FILENAME=$THEME_ZIP_FILENAME" >> "$GITHUB_ENV" | |
| - name: "Debug info: show tooling versions" | |
| continue-on-error: true | |
| run: | | |
| set +e | |
| echo "Start debug Info" | |
| echo "Date: ${{ env.DATE_VERSION }}" | |
| echo "PHP Version: $(php -v)" | |
| echo "Composer Version: $(composer --version)" | |
| echo "Node Version: $(node --version)" | |
| echo "NPM Version: $(npm --version)" | |
| echo "GIT Version: $(git --version)" | |
| echo "The github context is:" | |
| echo "${{ toJson(github) }}" | |
| echo "The Theme version is:" | |
| echo "${{ env.PACKAGE_VERSION }}" | |
| echo "The Theme slug is:" | |
| echo "hello-elementor" | |
| echo "End debug Info" | |
| echo "exitcode=$?" >> $GITHUB_OUTPUT | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Install Composer dependencies | |
| run: | |
| composer install --no-dev | |
| - name: Build | |
| run: npm run zip | |
| - name: Upload zip file to GitHub actions artifact | |
| id: upload-artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hello-elementor | |
| path: hello-elementor.*.zip | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Find existing comment on PR (Elementor repo) | |
| if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.repo.full_name, 'elementor/') | |
| uses: peter-evans/find-comment@v4 | |
| id: find | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: 'Hello Elementor Build' | |
| - name: Comment build info on PR (Elementor repo) | |
| if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.repo.full_name, 'elementor/') | |
| uses: peter-evans/create-or-update-comment@v5 | |
| with: | |
| comment-id: ${{ steps.find.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ## Hello Elementor Build | |
| Last updated at: ${{ env.DATE_VERSION }} | |
| Version: ${{ env.PACKAGE_VERSION }} | |
| ✅ Hello Elementor build is ready for download. | |
| You can download the latest build from the link below: | |
| 🔗 [${{ env.THEME_ZIP_FILENAME }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-artifact.outputs.artifact-id }}) | |
| The build is available for 7 days. | |
| edit-mode: replace | |
| - name: Print artifact info for fork PR | |
| if: github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.repo.full_name, 'elementor/') | |
| run: | | |
| echo "Artifact info:" | |
| echo " Name: hello-elementor" | |
| echo " Path: ${{ env.THEME_ZIP_FILENAME }}" | |
| echo " Size: $(du -sh "${{ env.THEME_ZIP_FILENAME }}" | cut -f1)" | |
| echo " URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-artifact.outputs.artifact-id }}" | |
| playground-preview: | |
| needs: [build_plugin] | |
| if: | | |
| always() && | |
| github.event_name == 'pull_request' && | |
| needs.build_plugin.result == 'success' && | |
| startsWith(github.repository, 'elementor/') | |
| permissions: | |
| contents: read | |
| actions: read | |
| deployments: write | |
| uses: ./.github/workflows/playground-preview.yml | |
| with: | |
| artifact_name: ${{ needs.build_plugin.outputs.artifact_name }} | |
| pr_number: ${{ github.event.pull_request.number }} | |
| head_sha: ${{ github.event.pull_request.head.sha }} |