Deploy to WordPress.org #3
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: Deploy to WordPress.org | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies, build and tag. | |
run: | | |
pnpm install | |
composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs | |
pnpm run deploy | |
- name: Get version from package.json | |
id: get_version | |
run: | | |
VERSION=$(node -p "require('./package.json').version") | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: WordPress Theme Deploy | |
uses: Codeinwp/[email protected] | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USER }} | |
VERSION: ${{ env.VERSION }} | |
BUILD_DIR: 'deploy/jadro' | |
SLUG: 'jadro' | |