From eed13f4d8da268a8d80896f7646ea53e00ce4834 Mon Sep 17 00:00:00 2001 From: balazs4 Date: Mon, 19 Jun 2023 10:49:51 +0200 Subject: [PATCH 1/4] call task docs in test workflow --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c91a5d9d..f633b5c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,10 @@ jobs: run: task build - name: Format run: task lint + - name: Check if docs are up-to-date + run: | + task docs + test 0 -eq `git status --porcelain | wc -l` && echo "Docs are up-to-date" test: name: Matrix Test From 3d3a7dd0ed48ca878104a279a729adcc4477183b Mon Sep 17 00:00:00 2001 From: balazs4 Date: Mon, 19 Jun 2023 10:55:14 +0200 Subject: [PATCH 2/4] add git diff --no-pager to make it clear what is the diff --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f633b5c4..45335dd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: - name: Check if docs are up-to-date run: | task docs + git diff --no-pager test 0 -eq `git status --porcelain | wc -l` && echo "Docs are up-to-date" test: From 7c7f9a65b88339abc1a3269524e57b6e955378de Mon Sep 17 00:00:00 2001 From: balazs4 Date: Mon, 19 Jun 2023 11:01:08 +0200 Subject: [PATCH 3/4] improve docs error message --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45335dd8..a8eb4652 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,8 +42,9 @@ jobs: - name: Check if docs are up-to-date run: | task docs - git diff --no-pager - test 0 -eq `git status --porcelain | wc -l` && echo "Docs are up-to-date" + git diff + BADDOCS=$(git status --porcelain) + test -z "$BADDOCS" || (echo -e "documentation needs regenerating using task docs: $BADDOCS"; exit 1) test: name: Matrix Test From 0733730572f72c69ad72541ac4e98dd9fcccd607 Mon Sep 17 00:00:00 2001 From: balazs4 Date: Mon, 19 Jun 2023 11:04:31 +0200 Subject: [PATCH 4/4] regenerate docs --- docs/data-sources/project.md | 2 +- docs/resources/dns_record.md | 2 +- docs/resources/project.md | 24 ++++++------------------ 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/data-sources/project.md b/docs/data-sources/project.md index f2440ed4..9e3cf943 100644 --- a/docs/data-sources/project.md +++ b/docs/data-sources/project.md @@ -60,7 +60,7 @@ output "project_id" { ### Nested Schema for `password_protection` -Read-Only: +Optional: - `protect_production` (Boolean) If true, production deployments will also be protected diff --git a/docs/resources/dns_record.md b/docs/resources/dns_record.md index 7d6f0e5d..73e95412 100644 --- a/docs/resources/dns_record.md +++ b/docs/resources/dns_record.md @@ -124,7 +124,7 @@ For 'TXT' records, this can contain arbitrary text. ### Nested Schema for `srv` -Required: +Optional: - `port` (Number) The TCP or UDP port on which the service is to be found. - `priority` (Number) The priority of the target host, lower value means more preferred. diff --git a/docs/resources/project.md b/docs/resources/project.md index 6f2f60b4..dc654949 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -77,43 +77,31 @@ resource "vercel_project" "example" { ### Nested Schema for `environment` -Required: - -- `key` (String) The name of the Environment Variable. -- `target` (Set of String) The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`. -- `value` (String, Sensitive) The value of the Environment Variable. - Optional: - `git_branch` (String) The git branch of the Environment Variable. - -Read-Only: - - `id` (String) The ID of the Environment Variable. +- `key` (String) The name of the Environment Variable. +- `target` (Set of String) The environments that the Environment Variable should be present on. Valid targets are either `production`, `preview`, or `development`. +- `value` (String, Sensitive) The value of the Environment Variable. ### Nested Schema for `git_repository` -Required: - -- `repo` (String) The name of the git repository. For example: `vercel/next.js`. -- `type` (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. - Optional: - `production_branch` (String) By default, every commit pushed to the main branch will trigger a Production Deployment instead of the usual Preview Deployment. You can switch to a different branch here. +- `repo` (String) The name of the git repository. For example: `vercel/next.js`. +- `type` (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. ### Nested Schema for `password_protection` -Required: - -- `password` (String, Sensitive) The password that visitors must enter to gain access to your Preview Deployments. Drift detection is not possible for this field. - Optional: +- `password` (String, Sensitive) The password that visitors must enter to gain access to your Preview Deployments. Drift detection is not possible for this field. - `protect_production` (Boolean) If true, production deployments will also be protected