bakerkretzmar / laravel-deploy-preview

A GitHub Action to deploy PR preview sites for Laravel apps.
MIT License
19 stars 6 forks source link

Add support for custom SSL certificates #18

Closed GlitchWitch closed 10 months ago

GlitchWitch commented 11 months ago

In certain dev environments that are not publicly accessible, let's encrypt will fail to connect to the server and issue a certificate. This causes both an error on forge, the error #19, and the inability to access the site.

To resolve this, an option to use or clone an existing certificate could be added the same way that it's available in the Forge UI.

image

GlitchWitch commented 11 months ago

Perhaps one of the following variables would make sense:

existing-certificate & existing-certificate-key

The existing-certificate and existing-certificate-key input parameters allow you to set a custom certificate rather then getting a new one from let's encrypt

Example:

- uses: bakerkretzmar/laravel-deploy-preview@v2
  with:
    forge-token: ${{ secrets.FORGE_TOKEN }}
    servers: |
      qa-1.acme.dev 60041
    existing-certificate: |
      ${{ secrets.SSL-CERTIFICATE}}
    existing-certificate-key: |
      ${{ secrets.SSL-PRIVATE-KEY }}

clone-certificate

The clone-certificate input parameter allows you to clone an existing site's certificate rather then getting a new one from let's encrypt. The input can be any other site ID within Forge.

Example:

- uses: bakerkretzmar/laravel-deploy-preview@v2
  with:
    forge-token: ${{ secrets.FORGE_TOKEN }}
    servers: |
      qa-1.acme.dev 60041
    clone-certificate: 90051
bakerkretzmar commented 10 months ago

Added in d12e80f72cf35294288cdbf63f3b0872f22b9244.