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
16 changes: 11 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,29 @@ jobs:

- name: Configure git
run: |
git config --global user.email "${{ env.GITHUB_EMAIL }}"
git config --global user.name "${{ env.GITHUB_USER }}"
git config --global user.email "${GITHUB_EMAIL}"
git config --global user.name "${GITHUB_USER}"

- name: Ensure inputs.version is valid semver
run: |
python ./docs/.github/scripts/validate_semver.py ${{ inputs.version }}
python ./docs/.github/scripts/validate_semver.py "${INPUT_VERSION}"
env:
INPUT_VERSION: ${{ inputs.version }}

- name: Parse release channel
id: parse_release_channel
run: |
# CHANNEL is the major and minor version of the VERSION_NUMBER (e.g. 0.1)
CHANNEL="$(echo ${{ inputs.version }} | cut -d '.' -f 1,2)"
CHANNEL="$(echo ${INPUT_VERSION} | cut -d '.' -f 1,2)"
echo "channel=$CHANNEL" >> "${GITHUB_OUTPUT}"
env:
INPUT_VERSION: ${{ inputs.version }}

- name: Release docs
run: |
./docs/.github/scripts/release-docs.sh ${{ inputs.version }}
./docs/.github/scripts/release-docs.sh "${INPUT_VERSION}"
env:
INPUT_VERSION: ${{ inputs.version }}

- name: Change the default branch
run: |
Expand Down
53 changes: 35 additions & 18 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,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_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 @@ -63,20 +60,27 @@ jobs:
path: ./radius
persist-credentials: false

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: docs/go.mod
cache: false

- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: docs/.node-version
cache: npm
cache-dependency-path: docs/package-lock.json
node-version-file: .node-version

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

- name: Install Docsy dependencies
working-directory: docs/themes/docsy
run: npm install --no-fund --no-audit
- name: Verify installations
working-directory: docs
run: |
echo "Go: $(go version)"
echo "Node.js: $(node --version)"
npm run hugo:version

- name: Generate Swagger docs
run: |
Expand All @@ -89,18 +93,31 @@ 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: |
if [ "${GITHUB_EVENT_NAME}" = 'pull_request' ]; then
STAGING_URL="https://${ENV_STATICWEBAPP_BASE}-pr${PR_NUMBER}.westus2.3.azurestaticapps.net/"
npm run build:preview -- -b "${STAGING_URL}"
else
npm run build
if [ "${GITHUB_EVENT_NAME}" == 'pull_request' ]; then
STAGING_URL="https://${ENV_STATICWEBAPP_BASE}-${GITHUB_EVENT_NUMBER}.westus2.3.azurestaticapps.net/"
fi
npm run build -- ${STAGING_URL+-b "$STAGING_URL"} --cacheDir "${RUNNER_TEMP}/hugo_cache"
env:
ENV_STATICWEBAPP_BASE: ${{ vars.ENV_STATICWEBAPP_BASE }}
PR_NUMBER: ${{ github.event.number }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
RUNNER_TEMP: ${{ runner.temp }}

- 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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;
}
}
}
12 changes: 7 additions & 5 deletions docs/assets/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
background: $primary;
min-height: 4rem;
margin: 0;
padding: .5rem 1rem;
z-index: 32;

@include media-breakpoint-up(md) {
Expand Down Expand Up @@ -153,6 +154,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 +172,13 @@ 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";
font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f0da";
position: absolute;
left: 0.1em;
padding-left: 0.4em;
Expand All @@ -189,7 +191,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 +204,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
29 changes: 28 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,27 @@

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

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


.cardpane-matrix {
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;

@include media-breakpoint-up(lg) {
grid-template-columns: repeat(2, 1fr);
}

> .td-card {
margin: 0 !important;
min-width: 0;
height: 100%;
}
}
Loading
Loading