Skip to content

Commit

Permalink
feat(doc): #940 improve examples
Browse files Browse the repository at this point in the history
- Improve examples in getting started section
- Simplify deploy

Signed-off-by: Daniel Salazar <[email protected]>
  • Loading branch information
dsalaza4 committed Mar 14, 2023
1 parent e7ae3f9 commit 896e05c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ 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:
Expand Down
23 changes: 18 additions & 5 deletions docs/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ where:
If no job is specified,
Makes displays all available jobs.

You can try:
Example:

- `$ m github:fluidattacks/makes@main`
- `$ m github:fluidattacks/makes@main /helloWorld`
- `$ m gitlab:fluidattacks/makes-example-2@main`
- `$ m /path/to/local/repo`
=== "GitHub"

```bash
m github:fluidattacks/makes@main
```

=== "GitLab"

```bash
m gitlab:fluidattacks/makes-example-2@main
```

=== "Local"

```bash
m /path/to/local/repo
```

Makes is powered by [Nix](https://nixos.org).
This means that it is able to run
Expand Down
14 changes: 2 additions & 12 deletions makes/docs/deploy/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@ 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}" \
&& args+=(
--remote-name
"https://${GITHUB_TOKEN}@github.com/fluidattacks/makes.git"
)
echo "${domain}" > "${cname_path}"
fi \
&& mkdocs "${args[@]}"
&& mkdocs gh-deploy --force --no-history
}

main "${@}"

0 comments on commit 896e05c

Please sign in to comment.