Skip to content

build(deps): bump cross-spawn from 7.0.3 to 7.0.6 #101

build(deps): bump cross-spawn from 7.0.3 to 7.0.6

build(deps): bump cross-spawn from 7.0.3 to 7.0.6 #101

name: Notify GitHub Pages URL
on:
pull_request:
types:
- opened
jobs:
notify-ghpages-url:
runs-on:
- ubuntu-latest
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
steps:
- name: Generate directory name
id: dir_name
run: |
DIR_NAME=${{ github.head_ref }}
DIR_NAME=${DIR_NAME////_}
echo "DIR_NAME=$DIR_NAME" >> $GITHUB_ENV
- name: Comment on PR
uses: actions/github-script@v6
with:
github-token: ${{ secrets.NOTIFY_GHPAGES_URL_PAT }}
script: |
const dir_name = process.env.DIR_NAME;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `Storybook URL: https://uyupun.github.io/official/${dir_name}/storybook/\n` +
`Lighthouse URL: https://uyupun.github.io/official/${dir_name}/lighthouse/`
});