Skip to content
Open
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
58 changes: 38 additions & 20 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:

permissions: {}

defaults:
run:
shell: bash

jobs:
build:
name: Build Hugo Website
Expand All @@ -28,16 +32,12 @@ jobs:
# If a PR into edge, use 'edge'. If a PR into anywhere else, use 'latest'. If a push, use the branch name.
name: ${{ github.event_name == 'pull_request' && (github.base_ref == 'edge' && 'edge' || 'latest') || github.ref_name }}
env:
GOVER: "^1.17"
TUTORIAL_PATH: "./docs/content/user-guides/tutorials/"
CODE_ZIP_PATH: "./docs/static/tutorial/"
HUGO_VERSION: 0.117.0
HUGO_ENV: production
steps:
- name: Checkout docs repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
fetch-depth: 0 # Required for enableGitInfo
persist-credentials: false

- name: Parse release version and set environment variables
Expand All @@ -51,24 +51,28 @@ jobs:
path: ./radius
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
node-version: "14"
go-version-file: docs/go.mod
cache: false

- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
node-version-file: .node-version

- name: Setup Docsy
- name: Install Node.js dependencies
working-directory: docs
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || npm install"

- name: Verify installations
working-directory: docs
run: |
cd docs
sudo npm install -D --save autoprefixer
sudo npm install -D --save postcss-cli
cd themes/docsy
npm install
echo "Go: $(go version)"
echo "Node.js: $(node --version)"
npm run hugo:version

- name: Generate Swagger docs
run: |
mkdir -p ./docs/static/swagger
Expand All @@ -80,13 +84,27 @@ jobs:
# Within docs/config.toml, replace the line that starts with "github_branch" with "github_branch: $GITHUB_HEAD_REF"
sed -i "s|github_branch = .*|github_branch = \"$GITHUB_HEAD_REF\"|" docs/config.toml

- name: Restore Hugo cache
id: cache-restore
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ runner.temp }}/hugo_cache
key: hugo-${{ github.run_id }}
restore-keys: hugo-

- name: Build Hugo Site
working-directory: docs
run: |
cd docs
if [ "${GITHUB_EVENT_NAME}" == 'pull_request' ]; then
STAGING_URL="https://${{ vars.ENV_STATICWEBAPP_BASE }}-${{github.event.number }}.westus2.3.azurestaticapps.net/"
fi
hugo ${STAGING_URL+-b "$STAGING_URL"}
npm run build -- ${STAGING_URL+-b "$STAGING_URL"} --cacheDir "${{ runner.temp }}/hugo_cache"

- name: Save Hugo cache
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ runner.temp }}/hugo_cache
key: ${{ steps.cache-restore.outputs.cache-primary-key }}

- name: Upload Hugo artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ docs/.hugo_build.lock
dictionary.dic
docs/static/swagger/**
.DS_STORE
docs/_vendor/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
4 changes: 2 additions & 2 deletions docs/assets/scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
order: 1;

p, li, td {
font-weight: $font-weight-body-text;
font-weight: $font-weight-normal;
}

> h1 {
Expand Down Expand Up @@ -90,4 +90,4 @@
@include media-breakpoint-up(sm) {
font-size: 3rem;
}
}
}
18 changes: 9 additions & 9 deletions docs/assets/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ nav.foldable-nav {
}

ul.foldable {
display: block;
max-height: 0;
overflow: hidden;
transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
Expand All @@ -170,13 +171,12 @@ nav.foldable-nav {
padding-left: 1.3em;
}

.ul-1 .with-child > label:before {
.with-child > label:before {
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0da";
content: "▸";
font-family: inherit;
font-weight: $font-weight-bold;
line-height: 1;
position: absolute;
left: 0.1em;
padding-left: 0.4em;
Expand All @@ -189,7 +189,7 @@ nav.foldable-nav {
}
}

.ul-1 .with-child > input:checked ~ label:before {
.with-child > input:checked ~ label:before {
color: $primary;
transform: rotate(90deg);
transition: transform 0.5s;
Expand All @@ -202,13 +202,13 @@ nav.foldable-nav {

nav.foldable-nav {

.ul-1 .with-child > label:hover:before {
.with-child > label:hover:before {
color: $primary;
transform: rotate(30deg);
transition: transform 0.5s;
}

.ul-1 .with-child > input:checked ~ label:hover:before {
.with-child > input:checked ~ label:hover:before {
color: $primary;
transform: rotate(60deg) !important;
transition: transform 0.5s;
Expand Down
20 changes: 13 additions & 7 deletions docs/assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

&__section-title {
display: block;
font-weight: $font-weight-medium;
font-weight: $font-weight-normal;

.active {
font-weight: $font-weight-bold;
Expand Down Expand Up @@ -98,20 +98,26 @@
}

.td-sidebar-link.tree-root{
font-weight: $font-weight-bold;
color: $td-sidebar-tree-root-color;
border-bottom: 1px $td-sidebar-tree-root-color solid;
font-weight: $font-weight-normal;
color: $gray-900;
border-bottom: 1px $gray-900 solid;
margin-bottom: 1rem;
margin-top: 1rem;
}

.td-sidebar-link.tree-root.active,
.td-sidebar-link.tree-root .active {
font-weight: $font-weight-bold;
}
}

.td-sidebar {
@include media-breakpoint-up(md) {
margin-top: 0;
padding-top: 4rem;
background-color: $td-sidebar-bg-color;
background-color: $gray-100;
padding-right: 1rem;
border-right: 1px solid $td-sidebar-border-color;
border-right: 1px solid $gray-300;
}


Expand All @@ -137,7 +143,7 @@
position: sticky;
top: 4rem;
z-index: 10;
height: calc(100vh - 6rem);
height: calc(100vh - 4rem);
}
}

Expand Down
18 changes: 17 additions & 1 deletion docs/assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import "nav";
@import "sidebar-tree";
@import "content";

.td-navbar .navbar-brand__name {
display: none;
}
Expand All @@ -10,4 +14,16 @@

.btn {
border-radius: 10px;
}
}

.td-content .alert-primary {
background-color: #ffffff;
color: inherit;
border-color: #c43821;
}

.cardpane-matrix > .td-card {
margin-right: 0 !important;
margin-bottom: 0;
height: 100%;
}
Loading
Loading