Skip to content

Commit

Permalink
Merge pull request #1033 from dsalaza4/main
Browse files Browse the repository at this point in the history
feat(doc): #940 custom domain
  • Loading branch information
dsalaza4 authored Mar 10, 2023
2 parents 5b5ca55 + e4dd454 commit e5a91e3
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ jobs:
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: docker://docker.io/nixos/nix@sha256:1d13ae379fb8caf3f859c5ce7ec6002643d60cf8b7b6147b949cc34880c93bac
name: /docs/gh-deploy
name: /docs/deploy
with:
set-safe-directory: /github/workspace
args: sh -c "nix-env -if . && m . /docs gh-deploy --force --no-history"
args: sh -c "nix-env -if . && m . /docs/deploy prod"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ It is

## Installation

[Installation](https://fluidattacks.github.io/makes/#installation)
[Installation](https://makes.fluidattacks.com/getting-started/#installation)

## Documentation

See https://fluidattacks.github.io/makes/
See https://makes.fluidattacks.com

## Issues

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/site
/src/CNAME
2 changes: 1 addition & 1 deletion docs/mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: Makes
site_url: https://fluidattacks.github.io/makes/
site_url: https://makes.fluidattacks.com/
site_description: Documentation for Makes
site_author: Fluid Attacks
repo_url: https://github.com/fluidattacks/makes
Expand Down
17 changes: 17 additions & 0 deletions makes/docs/deploy/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# shellcheck shell=bash

function main {
local env="${1:-}"
local domain="makes.fluidattacks.com"
local cname_path="src/CNAME"

: \
&& pushd docs \
&& rm -rf "${cname_path}" \
&& if [ "${env}" == "prod" ]; then
echo "${domain}" > "${cname_path}"
fi \
&& mkdocs gh-deploy --force --no-history
}

main "${@}"
10 changes: 10 additions & 0 deletions makes/docs/deploy/main.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
makeScript,
outputs,
...
}:
makeScript {
name = "docs-deploy";
entrypoint = ./entrypoint.sh;
searchPaths.source = [outputs."/docs/runtime"];
}
2 changes: 1 addition & 1 deletion makes/docs/entrypoint.sh → makes/docs/dev/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function main {
: \
&& pushd docs \
&& mkdocs "${@}"
&& mkdocs serve
}

main "${@}"
2 changes: 1 addition & 1 deletion makes/docs/main.nix → makes/docs/dev/main.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}:
makeScript {
name = "docs";
name = "docs-dev";
entrypoint = ./entrypoint.sh;
searchPaths.source = [outputs."/docs/runtime"];
}

0 comments on commit e5a91e3

Please sign in to comment.