For AI agents: the complete documentation index is available at /ja/llms.txt, the full documentation bundle is available at /ja/llms-full.txt, and this page is available as Markdown at /ja/references/inputs/optional/cwd.md.
  • 日本語
  • cwd

    プロジェクトのルートディレクトリのパスを指定できるオプションです。

    Info

    デフォルトはprocess.cwd()から取得した値を使用します。

    Monorepoを採用している方へ

    pnpm workspace等を利用している場合、cwdに各プロジェクトのディレクトリを指定してactions-vercelを実行してしまうと、適切に依存関係をインストールできない可能性があります。詳細はMonorepoを使用するを参照してください。

    使用例

    name: Vercel
    
    on:
      push:
        branches: [main]
      pull_request:
    
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true
    
    jobs:
      deploy:
        name: Deploy
        runs-on: ubuntu-latest
        permissions:
          contents: read
          deployments: write
          statuses: write
          pull-requests: write
    
        steps:
          - uses: actions/checkout@v7
    
          - uses: nexterias/actions-vercel@v2
            with:
              token: ${{ secrets.VERCEL_TOKEN }}
              org-id: ${{ secrets.VERCEL_ORG_ID }}
              project-id: ${{ secrets.VERCEL_PROJECT_ID }}
              production: ${{ github.ref == 'refs/heads/main' }}
              cwd: "./your-ultimate-app"