Skip to content

📡 Github Action to auto-comment on pull request where the actions took place

Notifications You must be signed in to change notification settings

modulz/now-deploy-preview-comment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

now-deploy-preview-comment

Github action to comment with the now.sh deployment preview URL

Inspired by netlify.com deployment preview comments

Requirements

  • ZEIT_TOKEN => The token used for deployment and query the zeit.co API
  • ZEIT_TEAMID => This is required if your deployment is made on team project.
  • PROJECT_NAME => This is required to ensure deployments are only referenced for a specific project.

Example

  • This is a complete .github/workflow/deploy-preview.yml example.
name: deploy website preview
on: [pull_request]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: deploy now
        env:
          ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
        run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
      - uses: iam4x/now-deploy-preview-comment@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
          ZEIT_TEAMID: team_XXXXXXXXXXX

About

📡 Github Action to auto-comment on pull request where the actions took place

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 66.5%
  • Dockerfile 33.5%