Skip to content

Commit e496643

Browse files
committed
test
1 parent f8208b8 commit e496643

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

.github/actions/check_if_latest_release/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ runs:
1717
echo "Release event tag: $RELEASE_EVENT_TAG_NAME"
1818
1919
if [ "$LATEST_TAG_NAME" == "$RELEASE_EVENT_TAG_NAME" ]; then
20-
echo "We are releasing the latest tag. Continuing deployment workflow."
20+
echo "We are releasing the latest tag."
2121
echo "IS_LATEST_RELEASE=true" >> $GITHUB_ENV
22-
exit 0
2322
else
24-
echo "We are not releasing the latest tag. Stopping deployment workflow."
23+
echo "We are not releasing the latest tag."
2524
echo "IS_LATEST_RELEASE=false" >> $GITHUB_ENV
26-
exit 0
2725
fi
2826
shell: bash

.github/workflows/deploy_latest_release.yml

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ jobs:
2626
id: checkRelease
2727
run: |-
2828
echo "IS_LATEST_RELEASE=${{ env.IS_LATEST_RELEASE }}" >> "$GITHUB_OUTPUT"
29-
echo ${{ env.IS_LATEST_RELEASE }}
30-
echo ${{ steps.checkRelease.outputs.test }}
29+
echo "Env: ${{ env.IS_LATEST_RELEASE }}"
30+
echo "Var: $IS_LATEST_RELEASE"
31+
echo "Output: ${{ steps.checkRelease.outputs.test }}"
3132
3233
3334
# Re-enable this when the PR is ready to be merged
@@ -74,45 +75,46 @@ jobs:
7475
deploy-demo-site:
7576
needs: check-latest-release
7677
runs-on: ubuntu-latest
77-
if: ${{ needs.check-latest-release.outputs.IS_LATEST_RELEASE}} == 'true'
7878
steps:
79-
- name: Did we trigger?
79+
- name: Continue deployment?
8080
run: |-
81-
echo "Job started"
82-
echo "IS_LATEST_RELEASE: ${{ needs.check-latest-release.outputs.IS_LATEST_RELEASE}}"
83-
84-
# - name: Checkout
85-
# uses: actions/checkout@v4
86-
87-
# - name: Setup node
88-
# id: setup_node
89-
# uses: actions/setup-node@v4
90-
# with:
91-
# node-version: 22
92-
# cache: "npm"
93-
94-
# - name: Install Monorepo Dependencies
95-
# run: |-
96-
# # Install node dependencies
97-
# node ./scripts/gtime.js monorepo_install npm ci
98-
99-
# - name: Generate Retail App Demo
100-
# uses: ./.github/actions/e2e_generate_app
101-
# with:
102-
# PROJECT_KEY: "retail-react-app-demo-site"
103-
104-
# - name: Create MRT credentials file
105-
# uses: "./.github/actions/create_mrt"
106-
# with:
107-
# mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }}
108-
# mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }}
109-
110-
# #TODO - change target to production once testing is done
111-
# - name: Push Bundle to MRT (Demo Site)
112-
# uses: "./.github/actions/push_to_mrt"
113-
# with:
114-
# CWD: "../generated-projects/retail-react-app-demo-site"
115-
# TARGET: staging
116-
# PROJECT: scaffold-pwa
117-
# MESSAGE: "tag ${{ github.event.release.tag_name }}"
118-
# FLAGS: --wait
81+
if [${{ needs.check-latest-release.outputs.IS_LATEST_RELEASE }} != 'true']
82+
echo "Deploy is not for the latest release. Stopping deployment"
83+
exit 0
84+
fi
85+
86+
- name: Checkout
87+
uses: actions/checkout@v4
88+
89+
- name: Setup node
90+
id: setup_node
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version: 22
94+
cache: "npm"
95+
96+
- name: Install Monorepo Dependencies
97+
run: |-
98+
# Install node dependencies
99+
node ./scripts/gtime.js monorepo_install npm ci
100+
101+
- name: Generate Retail App Demo
102+
uses: ./.github/actions/e2e_generate_app
103+
with:
104+
PROJECT_KEY: "retail-react-app-demo-site"
105+
106+
- name: Create MRT credentials file
107+
uses: "./.github/actions/create_mrt"
108+
with:
109+
mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }}
110+
mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }}
111+
112+
#TODO - change target to production once testing is done
113+
- name: Push Bundle to MRT (Demo Site)
114+
uses: "./.github/actions/push_to_mrt"
115+
with:
116+
CWD: "../generated-projects/retail-react-app-demo-site"
117+
TARGET: staging
118+
PROJECT: scaffold-pwa
119+
MESSAGE: "tag ${{ github.event.release.tag_name }}"
120+
FLAGS: --wait

0 commit comments

Comments
 (0)