Skip to content

fix: add environment setting for new job #26

fix: add environment setting for new job

fix: add environment setting for new job #26

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [ "slave" ]
pull_request:
branches: [ "slave" ]
jobs:
deploy:
environment: github-pages
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Build
run: npm run build:canary
- 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]
environment: github-pages
if: github.event_name == 'push' || github.event_name == 'pull_request'
steps:
- name: Emit repository_dispatch event to canary heartbeat
uses: mvasigh/dispatch-action@main
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.LICENSE_TO_DISPATCH_NOTIFY }}
repo: react-adobe-embed-cd-canary
owner: ZIPING-LIU-CORPORATION
event_type: react_adobe_embed_code_pushed