Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not deploying to production #22

Closed
jpangelle opened this issue Jul 21, 2020 · 5 comments
Closed

Not deploying to production #22

jpangelle opened this issue Jul 21, 2020 · 5 comments
Labels
Type: Question Further information is requested

Comments

@jpangelle
Copy link

I am having trouble deploying to production. If I remove the vercel-args: '--prod' line, it properly deploys to my Vercel staging environment, but having the vercel-args: '--prod' line just does not deploy at all. I can not figure out why.

My deploy-to-production.yml config:

name: Deploy to Vercel

on:
  push:
    branches: [master]
    paths-ignore:
      - "server/**"

jobs:
  lint:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: client
    steps:
      - uses: actions/checkout@v2
      - uses: hallee/eslint-action@1.0.3
        with:
          repo-token: ${{secrets.GITHUB_TOKEN}}
          source-root: client
  deploy-to-production:
    needs: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: amondnet/vercel-action@v19
        with:
          github-comment: false
          vercel-args: '--prod'
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
@jpangelle
Copy link
Author

jpangelle commented Jul 21, 2020

It appears that when I run vercel --prod command in the terminal, nothing happens so maybe this is not related to this Action.

@jpangelle
Copy link
Author

jpangelle commented Jul 21, 2020

In order for it to work, I had to remove this from my vercel.json:

"github": {
  "enabled": false
}

This is still confusing me because the instructions directed me to add this. 🤷‍♂️

@jpangelle
Copy link
Author

Actually, argggg. Still not working even with that removed.

@amondnet amondnet added the Type: Question Further information is requested label Jul 24, 2020
@amondnet
Copy link
Owner

Where is your publish directory? Is it a static site?

example

// Your Build Script(if not static site)

      - uses: amondnet/vercel-action@v19
        with:
          github-comment: false
          vercel-args: '--prod'
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          working-directory: 'client' // your directory

@jpangelle
Copy link
Author

Ah that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants