Skip to content

Deploy

Deploy #14

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: 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: Extract Hello Theme build
run: |
HT_ZIP=$(find . -name "hello-elementor-*.zip" -o -name "hello-elementor.*.zip" -type f | head -1)
unzip -q "$HT_ZIP" -d ./tmp/
mv ./tmp/hello-elementor ./hello-elementor
rm -rf ./tmp
- 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"