From df6f58102c2ac0fff4c812095eaf6a92d785bbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 6 Jan 2025 19:00:28 +0100 Subject: [PATCH] Automatically deploying assets & readme --- .github/workflows/asset-update.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/asset-update.yml diff --git a/.github/workflows/asset-update.yml b/.github/workflows/asset-update.yml new file mode 100644 index 00000000..936bca8f --- /dev/null +++ b/.github/workflows/asset-update.yml @@ -0,0 +1,37 @@ +name: "Asset & readme deployment" +on: + push: + branches: + - master + paths: + - "assets/**" + - "src/txt/readme.txt" +jobs: + deploy: + name: "Upload assets & readme to wordpress.org" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + sparse-checkout: | + assets + src/txt/readme.txt + + - name: "Move readme to root" + run: | + mv src/txt/readme.txt readme.txt + + - name: Install SVN + run: | + sudo apt-get update + sudo apt-get install subversion + + - name: WordPress Deploy + id: deploy + uses: 10up/action-wordpress-plugin-asset-update@2.1.3 + env: + ASSETS_DIR: assets + IGNORE_OTHER_FILES: true + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}