deployctl
deployctl copied to clipboard
feat(action): auto-discovery of deno.json and auto-populate defaults
Closes #350
PS: the diff is not that huge, most of the changed files are due to the addition of a jsonc parser package in the node_module directory
Features:
- Add a new option
deno-config- Auto-discovery of
deno.json/deno.jsoncfrom the root file
- Auto-discovery of
- If the deno config file exists, then
projectdefaults to"deploy.project"entrypointdefaults to"deploy.entrypoint"excludedefaults to"deploy.exclude"includedefaults to"deploy.include"import-mapdefaults to"importMap"- If it contains a
"import"field, it is saved as JSON toimport-map-autogen-temp, allowing use of JSONC deno config file since using them directly inimport-mapwould cause parsing issues if there is comments
- If it contains a
Changes:
- Added
jsoncas dependency - Modified the workflow to have the test project as variable so it's easier for contributor to test their code
- Updated docs about the new
deno-configfeature - Added a new test case to cover this new feature
Side note: since the deno config is discovered it allows for a really clean workflow, and also if user test their deployment from the CLI version (which populates the "deploy" section of deno config) then they'll have the same "experience" on the GA version.
It may or may not be considered a breaking change, since the config file was totally ignored before, so it could change they way if work if inputs were explicit
steps:
- name: Clone repository
uses: actions/checkout@v4
# ...
- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1