Skip to content

Commit

Permalink
fix: try again with the job env sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziping Liu committed Oct 29, 2023
1 parent 43fe30e commit 894aa8a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/canaryapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@ jobs:
- name: Read Build Timestamped Env from .env FILE generated
id: set_modified_timestamped_actions_gh_pages
run: |
echo "DATEMODIFIED_CODE_DEPLOYMENT=$(cat .env | grep DATEMODIFIED_CODE_DEPLOYMENT | cut -d '=' -f2)" >> $GITHUB_OUTPUT
echo "DATEMODIFIED_CODE_DEPLOYMENT=$(cat .env | grep DATEMODIFIED_CODE_DEPLOYMENT | cut -d '=' -f2)" >> $GITHUB_ENV
- name: deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./build
alert_code_change:
runs-on: ubuntu-latest
needs: [deploy]
needs: deploy
environment: github-pages
if: github.event_name == 'push' || github.event_name == 'pull_request'
steps:
- name: Access the output variable from the deploy job
run: |
echo "DATEMODIFIED_CODE_DEPLOYMENT=${{ needs.deploy.outputs.DATEMODIFIED_CODE_DEPLOYMENT }}"
- name: Emit repository_dispatch event to canary heartbeat
uses: mvasigh/dispatch-action@main
with:
Expand All @@ -47,5 +50,7 @@ jobs:
event_type: react_adobe_embed_code_pushed
message: |
{
"DATEMODIFIED_CODE_DEPLOYED" : "${{ needs.deploy.outputs.DATEMODIFIED_CODE_DEPLOYMENT }}"
"DATEMODIFIED_CODE_DEPLOYED" : "env.DATEMODIFIED_CODE_DEPLOYMENT",
}
env:
DATEMODIFIED_CODE_DEPLOYMENT: ${{ needs.deploy.outputs.DATEMODIFIED_CODE_DEPLOYMENT }}

0 comments on commit 894aa8a

Please sign in to comment.