From 966582494a7a82b8b00dfe389ac1166bde6b920f Mon Sep 17 00:00:00 2001 From: Scott Moucka Date: Tue, 12 Dec 2023 17:46:31 -0500 Subject: [PATCH] rsync and distignore --- .distignore | 14 +++++ .github/workflows/continuous_deployment.yml | 68 +++++++++++++-------- 2 files changed, 57 insertions(+), 25 deletions(-) create mode 100644 .distignore diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..373ddb1 --- /dev/null +++ b/.distignore @@ -0,0 +1,14 @@ +/docs +.changelogger* +.DS_Store +.git +.github +.gitignore +.idea +.phpunit.* +.phpcs.* +.python-version +.pre-commit-config.yaml +CHANGELOG.md +makefile +.distignore diff --git a/.github/workflows/continuous_deployment.yml b/.github/workflows/continuous_deployment.yml index dcede8d..b88fd5f 100644 --- a/.github/workflows/continuous_deployment.yml +++ b/.github/workflows/continuous_deployment.yml @@ -1,9 +1,9 @@ name: Master Release run-name: "Master Release" -on: - push: - branches: - - 'master' +on: [pull_request] +# push: +# branches: +# - 'master' jobs: determine-if-deploy: @@ -31,7 +31,7 @@ jobs: github-tag-and-release: runs-on: ubuntu-latest needs: determine-if-deploy - if: needs.determine-if-deploy.outputs.deploy == 'true' +# if: needs.determine-if-deploy.outputs.deploy == 'true' steps: - uses: actions/checkout@v3 - name: Setup Python 3.11 @@ -53,30 +53,48 @@ jobs: changelogger notes $VERSION --no-pretty >> $GITHUB_ENV echo ${DELIMITER} >> $GITHUB_ENV - - name: Create GitHub Tag & Release - uses: ncipollo/release-action@v1 - with: - tag: ${{ needs.determine-if-deploy.outputs.version }} - commit: ${{ github.sha }} - name: Release ${{ needs.determine-if-deploy.outputs.version }} - body: ${{ env.content }} - prerelease: true + - name: Exclude files + run: | + wrapper_dir="magento2-klaviyo" + mkdir $wrapper_dir + rsync -rc --exclude-from=".distignore" "$GITHUB_WORKSPACE/" $wrapper_dir/ --delete --delete-excluded + ls $wrapper_dir - - name: Send PagerDuty alert on failure - if: ${{ failure() }} - uses: award28/action-pagerduty-alert@0.4.0 - with: - pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' - pagerduty-dedup-key: magento_two_cd +# - name: Create Archive +# uses: thedoctor0/zip-release@0.7.1 +# with: +# type: 'zip' +# filename: "klaviyo_reclaim-${{ needs.determine-if-deploy.outputs.version }}.zip" +# exclusions: '*.git* ' +# +# - name: Temp - upload zip for testing +# uses: actions/upload-artifact@v3 +# with: +# path: "klaviyo_reclaim-${{ needs.determine-if-deploy.outputs.version }}.zip" +# - name: Create GitHub Tag & Release +# uses: ncipollo/release-action@v1 +# with: +# tag: ${{ needs.determine-if-deploy.outputs.version }} +# commit: ${{ github.sha }} +# name: Release ${{ needs.determine-if-deploy.outputs.version }} +# body: ${{ env.content }} +# prerelease: true + +# - name: Send PagerDuty alert on failure +# if: ${{ failure() }} +# uses: award28/action-pagerduty-alert@0.4.0 +# with: +# pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' +# pagerduty-dedup-key: magento_two_cd integration-release: runs-on: ubuntu-latest needs: [determine-if-deploy, github-tag-and-release] steps: - run: echo "Releasing to Magento2" - - name: Send PagerDuty alert on failure - if: ${{ failure() }} - uses: award28/action-pagerduty-alert@0.4.0 - with: - pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' - pagerduty-dedup-key: magento_two_cd +# - name: Send PagerDuty alert on failure +# if: ${{ failure() }} +# uses: award28/action-pagerduty-alert@0.4.0 +# with: +# pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}' +# pagerduty-dedup-key: magento_two_cd