diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index dc1412df..8baeaa42 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -172,6 +172,7 @@ jobs: set-safe-directory: /github/workspace args: sh -c "nix-env -if . && m . /docs/deploy prod" env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} linux_envVars_example: diff --git a/docs/src/api/builtins/database.md b/docs/src/api/builtins/database.md index 08d27067..3d1473bb 100644 --- a/docs/src/api/builtins/database.md +++ b/docs/src/api/builtins/database.md @@ -28,8 +28,9 @@ Example: === "makes.nix" ```nix - { projectPath, - ... + { + projectPath, + ... }: { dynamoDb = { usersdb = { diff --git a/docs/src/api/builtins/index.md b/docs/src/api/builtins/index.md index fbc60a91..8d44e7c3 100644 --- a/docs/src/api/builtins/index.md +++ b/docs/src/api/builtins/index.md @@ -22,9 +22,10 @@ A `makes.nix` file should be: and returns an attribute set of configuration options: ```nix - { argA - , argB - , ... + { + argA, + argB, + ... }: { configOption1 = { # ... diff --git a/docs/src/api/extensions/format-conversion.md b/docs/src/api/extensions/format-conversion.md index fbd04797..f20622e3 100644 --- a/docs/src/api/extensions/format-conversion.md +++ b/docs/src/api/extensions/format-conversion.md @@ -16,7 +16,8 @@ Example: ```nix # /path/to/my/project/makes/example/main.nix - { fromJson, + { + fromJson, makeDerivation, ... }: diff --git a/makes/docs/deploy/entrypoint.sh b/makes/docs/deploy/entrypoint.sh index beceb6d7..83f4afb4 100644 --- a/makes/docs/deploy/entrypoint.sh +++ b/makes/docs/deploy/entrypoint.sh @@ -4,14 +4,24 @@ function main { local env="${1:-}" local domain="makes.fluidattacks.com" local cname_path="src/CNAME" + local args=( + gh-deploy + --force + --no-history + ) : \ && pushd docs \ && rm -rf "${cname_path}" \ && if [ "${env}" == "prod" ]; then - echo "${domain}" > "${cname_path}" + : \ + && echo "${domain}" > "${cname_path}" \ + && args+=( + --github-remote + "https://${GITHUB_TOKEN}@github.com/fluidattacks/makes.git" + ) fi \ - && mkdocs gh-deploy --force --no-history + && mkdocs "${args[@]}" } main "${@}"