This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/.dagger/env/docs/plan/main.cue
Andrea Luzzardi 16cbb7fca0 docs: auth: reduce scope
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-18 17:20:28 +02:00

31 lines
760 B
CUE

package main
import (
"dagger.io/dagger"
"dagger.io/js/yarn"
"dagger.io/netlify"
)
// dagger repository
repository: dagger.#Artifact @dagger(input)
// Build the docs website
docs: yarn.#Package & {
source: repository
cwd: "website/"
buildDir: "website/build"
env: {
OAUTH_ENABLE: "true"
REACT_APP_OAUTH_SCOPE: "user:email"
REACT_APP_GITHUB_AUTHORIZE_URI: "https://github.com/login/oauth/authorize?client_id=${REACT_APP_CLIENT_ID}&scope=${REACT_APP_OAUTH_SCOPE}&allow_signup=false"
REACT_APP_DAGGER_SITE_URI: "https://dagger.io"
REACT_APP_API_PROXY_ENABLE: "true"
}
}
// Deploy the docs website
site: netlify.#Site & {
name: string | *"docs-dagger-io" @dagger(input)
contents: docs.build
}