Skip to content

config: write unified github workflows #84

config: write unified github workflows

config: write unified github workflows #84

name: share-preview-url
on:
pull_request:
types:
- opened
- ready_for_review
jobs:
comment-on-pr:
runs-on: ubuntu-latest
permissions: write-all

Check failure on line 10 in .github/workflows/share-preview-url.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/share-preview-url.yml

Invalid workflow file

You have an error in your yaml syntax on line 10
steps:
- uses: actions/checkout@v4
- name: get dest dir for web components
id: get_dest_dir_components
working-directory: ./packages/components
run: echo "DEST_DIR_COMPONENTS=js/preview-$GITHUB_HEAD_REF" >> "$GITHUB_ENV"
- name: get dest dir for web embed
id: get_dest_dir_embed
working-directory: ./packages/embed
run: echo "DEST_DIR_EMBED=inline/preview-$GITHUB_HEAD_REF" >> "$GITHUB_ENV"
- name: share preview urls as PR comment
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
This branch has been deployed to s3 / cloudfront.
✅ Preview URL for Components / Smart Camera Web:
https://cdn.smileidentity.com/${{ env.DEST_DIR_COMPONENTS }}/smart-camera-web.js
✅ Preview URL for Embed:
https://cdn.smileidentity.com/${{ env.DEST_DIR_EMBED }}/js/script.min.js