LoginSignup
3
3

More than 5 years have passed since last update.

Heroku buttonはGithubプライベートリポジトリにも対応している

Posted at

Heroku buttonがいつの間にかGithubプライベートリポジトリでも使えるようになっていました。

設定方法はパブリックなリポジトリのボタンと少し違っていて、ボタンのリンクに template={リポジトリへのURL} をつける必要があります。
Markdownならこう書きます。

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/{Githubのid}/{リポジトリ名})

また、デプロイにはHerokuアカウントとプライベートリポジトリへのアクセス権があるGithubアカウントを連携させておく必要があります。
連携させていない状態でHeroku buttonを使うと、以下のような画面が表示されます。赤丸部分をクリックすると、デプロイ画面に進みます。
heroku_button.jpg

参考: Creating a 'Deploy to Heroku' Button | Heroku Dev Center

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3