Skip to content

Deploy

Deploy #8

Workflow file for this run

name: Deploy
permissions:
contents: read
actions: read
on:
workflow_dispatch:
inputs:
dry_run:
type: boolean
description: 'Dry run mode (test without deploying)'
required: false
default: false
jobs:
build:
if: ( github.actor == 'ManorHazaz' || github.actor == 'hein-obox' || github.actor == 'KingYes' || github.actor == 'arielk' || github.actor == 'nicoladj77' ) && startsWith( github.repository, 'elementor/' )
uses: ./.github/workflows/build.yml
secrets: inherit
deploy:
needs: build
if: needs.build.result == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check build job status
run: |
echo "Build job result: ${{ needs.build.result }}"
if [ "${{ needs.build.result }}" != "success" ]; then
echo "ERROR: Build job did not complete successfully. Result: ${{ needs.build.result }}"
echo "Build job may have been skipped due to conditional check."
exit 1
fi
- name: Preparing envs
run: |
echo "THEME_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: hello-elementor
- name: Validate changelog
env:
VERSION: ${{ env.THEME_VERSION }}
run: |
bash "${GITHUB_WORKSPACE}/.github/scripts/validate-changelog.sh"
- name: Install SVN
run: |
sudo apt-get update -y
sudo apt-get install -y subversion
which svn
svn --version
- name: Publish to WordPress.org SVN (Dry Run)
if: ${{ inputs.dry_run == true }}
run: |
bash "${GITHUB_WORKSPACE}/.github/scripts/publish-theme-to-wordpress-org-dry-run.sh"
- name: Publish to WordPress.org SVN
if: ${{ inputs.dry_run == false }}
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
bash "${GITHUB_WORKSPACE}/.github/scripts/publish-theme-to-wordpress-org.sh"
- name: Send Slack Notification
if: ${{ inputs.dry_run == false }}
uses: ./.github/actions/theme-slack-notification-release
with:
CLOUD_SLACK_BOT_TOKEN: ${{ secrets.CLOUD_SLACK_BOT_TOKEN }}
PACKAGE_VERSION: ${{ env.THEME_VERSION }}
SLACK_CHANNEL: "#tmz-hello-delivery"