From 94bacc9e224e92d3770207d9d7621290a6fc10be Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Tue, 14 Mar 2023 15:48:57 -0500 Subject: [PATCH] feat(build): #940 push with technology - Push gh-pages versions with technology Signed-off-by: Daniel Salazar --- .github/workflows/prod.yml | 1 + docs/src/api/builtins/database.md | 5 +++-- docs/src/api/builtins/index.md | 7 ++++--- docs/src/api/extensions/format-conversion.md | 3 ++- makes/docs/deploy/entrypoint.sh | 14 ++++++++++++-- 5 files changed, 22 insertions(+), 8 deletions(-) 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 "${@}"