Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/jan-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ jobs:
with:
node-version: 18

- name: Install jq
uses: dcarbone/[email protected]

- name: Fill env vars
run: |
env_example_file=".env.example"
touch .env
while IFS= read -r line || [[ -n "$line" ]]; do
if [[ "$line" == *"="* ]]; then
var_name=$(echo $line | cut -d '=' -f 1)
echo $var_name
var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")"
echo "$var_name=$var_value" >> .env
fi
done < "$env_example_file"
working-directory: docs
env:
SECRETS: '${{ toJson(secrets) }}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks @hiento09


- name: Install dependencies
run: yarn install
working-directory: docs
Expand Down
1 change: 1 addition & 0 deletions docs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GTM_ID=xxxx
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $ yarn
### Local Development

```
$ cp .env.example .env
$ yarn start
```

Expand Down
6 changes: 6 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

require("dotenv").config();

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

Expand Down Expand Up @@ -81,6 +83,10 @@ const config = {
theme: {
customCss: require.resolve("./src/styles/main.scss"),
},
// GTM is always inactive in development and only active in production to avoid polluting the analytics statistics.
googleTagManager: {
containerId: process.env.GTM_ID,
},
// Will be passed to @docusaurus/plugin-content-pages (false to disable)
// pages: {},
}),
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.1",
"dotenv": "^16.3.1",
"tailwindcss-animate": "^1.0.7"
},
"browserslist": {
Expand Down
5 changes: 5 additions & 0 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4939,6 +4939,11 @@ dot-prop@^6.0.1:
dependencies:
is-obj "^2.0.0"

dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

duplexer3@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e"
Expand Down