|
26 | 26 | id: checkRelease |
27 | 27 | run: |- |
28 | 28 | 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 }}" |
31 | 32 |
|
32 | 33 |
|
33 | 34 | # Re-enable this when the PR is ready to be merged |
@@ -74,45 +75,46 @@ jobs: |
74 | 75 | deploy-demo-site: |
75 | 76 | needs: check-latest-release |
76 | 77 | runs-on: ubuntu-latest |
77 | | - if: ${{ needs.check-latest-release.outputs.IS_LATEST_RELEASE}} == 'true' |
78 | 78 | steps: |
79 | | - - name: Did we trigger? |
| 79 | + - name: Continue deployment? |
80 | 80 | 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