Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpaul committed Mar 20, 2023
1 parent c0eae28 commit a9b5492
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Deploy

# Run deploy only on tag and master builds.
# Run deploy only on publised releases.
on:
push:
branches:
- master
release:
types: [published]

Expand Down Expand Up @@ -32,15 +29,21 @@ jobs:
- name: Install NPM dependencies
run: npm install

- name: Authenticate with WordPress.org SVN
run: svn info --non-interactive --username "${{ secrets.SVN_USERNAME }}" --password "${{ secrets.SVN_PASSWORD }}" https://plugins.svn.wordpress.org/two-factor/
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Deploy to WordPress.org SVN
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
DEPLOY_SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
DEPLOY_TRUNK: ${{ contains( github.ref_name, 'master' ) }}
DEPLOY_TAG: ${{ contains( github.ref_type, 'tag' ) }}
DEPLOY_SKIP_CONFIRMATION: true
# Disable deployments while they are failing for unknown reason.
if: env.DEPLOY_SVN_USERNAME && false
run: npm run deploy
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip

0 comments on commit a9b5492

Please sign in to comment.