From 7b6cfc724900f1c76d7f190949312cf37b530d28 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 17:01:18 +0200 Subject: [PATCH 1/8] chore: check qa deployment --- .github/workflows/sync-qa.yml | 81 +++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index 11ca7f26eb..317cc3fbdc 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -42,40 +42,49 @@ jobs: yarn install --frozen-lockfile yarn run build yarn run dist - - name: Authenticate - run: | - mkdir $HOME/.ssh - echo "$SSH_KEY" > "$HOME/.ssh/key" - chmod 600 "$HOME/.ssh/key" - - uses: chrnorm/deployment-action@releases/v1 - name: Create deployment - id: deployment - with: - token: ${{ secrets.BOT_TOKEN }} - target_url: http://qa-neve.themeisle.com/empty-site - environment: staging - - name: Deploy to QA env - run: > - rsync -rc --delete --exclude-from="$GITHUB_WORKSPACE/.distignore" -e "ssh -i - $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" - "$GITHUB_WORKSPACE/dist/neve/" $SSH_USERNAME@$SSH_HOST:$QA_ROOT - - name: Rebuild Neve Reference - run: > - ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no - $SSH_USERNAME@$SSH_HOST "bash ~/reset-neve-qa.sh" - - name: Update deployment status (success) - if: success() - uses: chrnorm/deployment-status@releases/v1 - with: - token: ${{ secrets.BOT_TOKEN }} - target_url: http://qa-neve.themeisle.com/empty-site - state: success - deployment_id: ${{ steps.deployment.outputs.deployment_id }} - - name: Run staging demosites deploy - uses: pagely/action-deploy@v1 + - name: Sync to QA + uses: SamKirkland/FTP-Deploy-Action@4.3.3 with: - PAGELY_DEPLOY_DEST: "/httpdocs/wp-content/themes/neve/" - PAGELY_INTEGRATION_SECRET: ${{secrets.PAGELY_INTEGRATION_SECRET}} - PAGELY_INTEGRATION_ID: ${{secrets.PAGELY_INTEGRATION_ID}} - PAGELY_APP_ID: ${{secrets.STG_DEMOSITES_PAGELY_APP_ID}} - PAGELY_WORKING_DIR: "${{github.workspace}}/dist/neve" + server: ${{ secrets.QA_FTP_HOST }} + username: ${{ secrets.QA_FTP_USER }} + password: ${{ secrets.QA_FTP_PASS }} + local-dir: $GITHUB_WORKSPACE/dist/neve + server-dir: ${{ secrets.QA_FTP_PATH }} + dry-run: true +# - name: Authenticate +# run: | +# mkdir $HOME/.ssh +# echo "$SSH_KEY" > "$HOME/.ssh/key" +# chmod 600 "$HOME/.ssh/key" +# - uses: chrnorm/deployment-action@releases/v1 +# name: Create deployment +# id: deployment +# with: +# token: ${{ secrets.BOT_TOKEN }} +# target_url: http://qa-neve.themeisle.com/empty-site +# environment: staging +# - name: Deploy to QA env +# run: > +# rsync -rc --delete --exclude-from="$GITHUB_WORKSPACE/.distignore" -e "ssh -i +# $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" +# "$GITHUB_WORKSPACE/dist/neve/" $SSH_USERNAME@$SSH_HOST:$QA_ROOT +# - name: Rebuild Neve Reference +# run: > +# ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no +# $SSH_USERNAME@$SSH_HOST "bash ~/reset-neve-qa.sh" +# - name: Update deployment status (success) +# if: success() +# uses: chrnorm/deployment-status@releases/v1 +# with: +# token: ${{ secrets.BOT_TOKEN }} +# target_url: http://qa-neve.themeisle.com/empty-site +# state: success +# deployment_id: ${{ steps.deployment.outputs.deployment_id }} +# - name: Run staging demosites deploy +# uses: pagely/action-deploy@v1 +# with: +# PAGELY_DEPLOY_DEST: "/httpdocs/wp-content/themes/neve/" +# PAGELY_INTEGRATION_SECRET: ${{secrets.PAGELY_INTEGRATION_SECRET}} +# PAGELY_INTEGRATION_ID: ${{secrets.PAGELY_INTEGRATION_ID}} +# PAGELY_APP_ID: ${{secrets.STG_DEMOSITES_PAGELY_APP_ID}} +# PAGELY_WORKING_DIR: "${{github.workspace}}/dist/neve" From 93f30356c6da8ad966c6fa6f6b1510998824ec92 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 17:05:19 +0200 Subject: [PATCH 2/8] chore: allow qa sync to run deploy to stagings --- .github/workflows/sync-qa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index 317cc3fbdc..0a05923a15 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -3,6 +3,7 @@ on: push: branches: - development + - fix/qa_sync - "!master" concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} From cded63b5439688158e2cbcf7ffbe60389d370dd4 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 17:18:10 +0200 Subject: [PATCH 3/8] chore: port added --- .github/workflows/sync-qa.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index 0a05923a15..aa4cdaa541 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -49,7 +49,8 @@ jobs: server: ${{ secrets.QA_FTP_HOST }} username: ${{ secrets.QA_FTP_USER }} password: ${{ secrets.QA_FTP_PASS }} - local-dir: $GITHUB_WORKSPACE/dist/neve + port: 22 + local-dir: $GITHUB_WORKSPACE/dist/neve/ server-dir: ${{ secrets.QA_FTP_PATH }} dry-run: true # - name: Authenticate From e4a26f4ee503bd02dfa21b56d00f5b25e2832251 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 17:22:30 +0200 Subject: [PATCH 4/8] chore: change local path --- .github/workflows/sync-qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index aa4cdaa541..eda7e12c25 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -50,7 +50,7 @@ jobs: username: ${{ secrets.QA_FTP_USER }} password: ${{ secrets.QA_FTP_PASS }} port: 22 - local-dir: $GITHUB_WORKSPACE/dist/neve/ + local-dir: ./dist/neve/ server-dir: ${{ secrets.QA_FTP_PATH }} dry-run: true # - name: Authenticate From 346c7be76d33859cfd53a1dbeac15ec3cd8c69a4 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 17:30:58 +0200 Subject: [PATCH 5/8] chore: change protocol --- .github/workflows/sync-qa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index eda7e12c25..327a7cb91d 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -49,6 +49,7 @@ jobs: server: ${{ secrets.QA_FTP_HOST }} username: ${{ secrets.QA_FTP_USER }} password: ${{ secrets.QA_FTP_PASS }} + protocol: ftps port: 22 local-dir: ./dist/neve/ server-dir: ${{ secrets.QA_FTP_PATH }} From 0bbb02c408be81891954a670724fc725c00420ca Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 18:03:45 +0200 Subject: [PATCH 6/8] chore: use sftp action --- .github/workflows/sync-qa.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index 327a7cb91d..b5fce056f0 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -44,15 +44,14 @@ jobs: yarn run build yarn run dist - name: Sync to QA - uses: SamKirkland/FTP-Deploy-Action@4.3.3 + uses: wlixcc/SFTP-Deploy-Action@v1.2.4 with: server: ${{ secrets.QA_FTP_HOST }} username: ${{ secrets.QA_FTP_USER }} password: ${{ secrets.QA_FTP_PASS }} - protocol: ftps - port: 22 - local-dir: ./dist/neve/ - server-dir: ${{ secrets.QA_FTP_PATH }} + sftp_only: true + local_path: './dist/neve/*' + remote_path: ${{ secrets.QA_FTP_PATH }} dry-run: true # - name: Authenticate # run: | From e956d7ecc66b2627b76cc550bf1902ec653cd597 Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 18:30:50 +0200 Subject: [PATCH 7/8] chore: added staging job to demosites --- .github/workflows/sync-qa.yml | 63 +++++++++++++---------------------- readme.md | 2 +- 2 files changed, 25 insertions(+), 40 deletions(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index b5fce056f0..e2b8ae22dc 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -18,7 +18,7 @@ jobs: SSH_KEY: ${{ secrets.SSH_KEY }} SSH_PORT: ${{ secrets.SSH_PORT }} SSH_HOST: ${{ secrets.SSH_HOST }} - QA_ROOT: ${{ secrets.QA_ROOT }} + QA_DS_STAGING_ROOT: ${{ secrets.QA_DS_STAGING_ROOT }} PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true CYPRESS_INSTALL_BINARY: 0 steps: @@ -52,41 +52,26 @@ jobs: sftp_only: true local_path: './dist/neve/*' remote_path: ${{ secrets.QA_FTP_PATH }} - dry-run: true -# - name: Authenticate -# run: | -# mkdir $HOME/.ssh -# echo "$SSH_KEY" > "$HOME/.ssh/key" -# chmod 600 "$HOME/.ssh/key" -# - uses: chrnorm/deployment-action@releases/v1 -# name: Create deployment -# id: deployment -# with: -# token: ${{ secrets.BOT_TOKEN }} -# target_url: http://qa-neve.themeisle.com/empty-site -# environment: staging -# - name: Deploy to QA env -# run: > -# rsync -rc --delete --exclude-from="$GITHUB_WORKSPACE/.distignore" -e "ssh -i -# $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" -# "$GITHUB_WORKSPACE/dist/neve/" $SSH_USERNAME@$SSH_HOST:$QA_ROOT -# - name: Rebuild Neve Reference -# run: > -# ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -# $SSH_USERNAME@$SSH_HOST "bash ~/reset-neve-qa.sh" -# - name: Update deployment status (success) -# if: success() -# uses: chrnorm/deployment-status@releases/v1 -# with: -# token: ${{ secrets.BOT_TOKEN }} -# target_url: http://qa-neve.themeisle.com/empty-site -# state: success -# deployment_id: ${{ steps.deployment.outputs.deployment_id }} -# - name: Run staging demosites deploy -# uses: pagely/action-deploy@v1 -# with: -# PAGELY_DEPLOY_DEST: "/httpdocs/wp-content/themes/neve/" -# PAGELY_INTEGRATION_SECRET: ${{secrets.PAGELY_INTEGRATION_SECRET}} -# PAGELY_INTEGRATION_ID: ${{secrets.PAGELY_INTEGRATION_ID}} -# PAGELY_APP_ID: ${{secrets.STG_DEMOSITES_PAGELY_APP_ID}} -# PAGELY_WORKING_DIR: "${{github.workspace}}/dist/neve" + - name: Add SSH Key + run: | + mkdir $HOME/.ssh + echo "$SSH_KEY" > "$HOME/.ssh/key" + chmod 600 "$HOME/.ssh/key" + - uses: chrnorm/deployment-action@releases/v1 + name: Create deployment staging.demosites.io + id: deployment + with: + token: ${{ secrets.BOT_TOKEN }} + target_url: https://staging.demosites.io/neve-3-gb/ + environment: staging + - name: Deploy to staging.demosites.io + run: | + rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" "$GITHUB_WORKSPACE/" $SSH_USERNAME@$SSH_HOST:$QA_DS_STAGING_ROOT + - name: Update deployment status (success) + if: success() + uses: chrnorm/deployment-status@releases/v1 + with: + token: ${{ secrets.BOT_TOKEN }} + target_url: https://staging.demosites.io/neve-3-gb/ + state: success + deployment_id: ${{ steps.deployment.outputs.deployment_id }} diff --git a/readme.md b/readme.md index d53f0f8557..48506e485c 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ **Requires PHP:** 5.5.0 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html - +synced from new GHA Neve is a super fast, easily customizable, multi-purpose theme. Perfect for blogs, small business, startups, agencies, firms & e-commerce shops. ## Description ## From 68b83ef1930ec947f6984f3d6db34a5187133c9f Mon Sep 17 00:00:00 2001 From: Bogdan Preda Date: Fri, 24 Feb 2023 18:38:03 +0200 Subject: [PATCH 8/8] chore: updated workflow to sync to qa --- .github/workflows/sync-qa.yml | 3 +-- readme.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-qa.yml b/.github/workflows/sync-qa.yml index e2b8ae22dc..1d4174c0b3 100644 --- a/.github/workflows/sync-qa.yml +++ b/.github/workflows/sync-qa.yml @@ -3,7 +3,6 @@ on: push: branches: - development - - fix/qa_sync - "!master" concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} @@ -43,7 +42,7 @@ jobs: yarn install --frozen-lockfile yarn run build yarn run dist - - name: Sync to QA + - name: Sync to QA server via SFTP uses: wlixcc/SFTP-Deploy-Action@v1.2.4 with: server: ${{ secrets.QA_FTP_HOST }} diff --git a/readme.md b/readme.md index 48506e485c..d53f0f8557 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ **Requires PHP:** 5.5.0 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html -synced from new GHA + Neve is a super fast, easily customizable, multi-purpose theme. Perfect for blogs, small business, startups, agencies, firms & e-commerce shops. ## Description ##