Skip to content

Commit

Permalink
rsync and distignore
Browse files Browse the repository at this point in the history
  • Loading branch information
smoucka committed Dec 12, 2023
1 parent ad60300 commit 9665824
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 25 deletions.
14 changes: 14 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/docs
.changelogger*
.DS_Store
.git
.github
.gitignore
.idea
.phpunit.*
.phpcs.*
.python-version
.pre-commit-config.yaml
CHANGELOG.md
makefile
.distignore
68 changes: 43 additions & 25 deletions .github/workflows/continuous_deployment.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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/[email protected]
with:
pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}'
pagerduty-dedup-key: magento_two_cd
# - name: Create Archive
# uses: thedoctor0/[email protected]
# 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/[email protected]
# 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/[email protected]
with:
pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}'
pagerduty-dedup-key: magento_two_cd
# - name: Send PagerDuty alert on failure
# if: ${{ failure() }}
# uses: award28/[email protected]
# with:
# pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}'
# pagerduty-dedup-key: magento_two_cd

0 comments on commit 9665824

Please sign in to comment.