Skip to content

Commit

Permalink
Merge pull request #504 from rstudio/ah/editing-pass
Browse files Browse the repository at this point in the history
Editing pass - Phase 1
  • Loading branch information
colearendt committed May 20, 2024
2 parents 8c587ad + 0617f75 commit 4567386
Show file tree
Hide file tree
Showing 71 changed files with 1,684 additions and 698 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/chart-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: helm-docs
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand All @@ -20,19 +20,22 @@ jobs:
with:
version: v3.6.3

- name: install Just
uses: extractions/setup-just@v2

- name: Install helm-docs
env:
version: 1.5.0
HELM_DOCS_VERSION: 1.13.1
run: |
echo "Installing helm-docs version $version"
curl -L -o helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v${version}/helm-docs_${version}_Linux_x86_64.tar.gz
tar -xzvf helm-docs.tar.gz helm-docs
rm -rf helm-docs.tar.gz
just setup
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release

- name: Run helm-docs
run: |
./helm-docs --chart-search-root=charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl
./helm-docs --chart-search-root=other-charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2

- name: Commit results
run: |
Expand Down Expand Up @@ -62,13 +65,12 @@ jobs:
with:
version: v3.6.3

- name: install Just
uses: extractions/setup-just@v2

- name: Compute and update dependent files
run: |
set -xe
cd ./charts/rstudio-launcher-rbac && helm dependency build && cd -
helm template -n rstudio rstudio-launcher-rbac ./charts/rstudio-launcher-rbac --set removeNamespaceReferences=true > examples/rbac/rstudio-launcher-rbac.yaml
CHART_VERSION=$(helm show chart ./charts/rstudio-launcher-rbac | grep '^version' | cut -d ' ' -f 2)
cp examples/rbac/rstudio-launcher-rbac.yaml examples/rbac/rstudio-launcher-rbac-${CHART_VERSION}.yaml
just rbac
- name: Commit results
run: |
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Quarto Publish to docs.posit.co

on:
workflow_dispatch:
push:
branches: main

permissions:
id-token: write
contents: read

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
id: creds
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Check out repository
uses: actions/checkout@v4

- name: install Just
uses: extractions/setup-just@v2

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2

- run: just push-docs

29 changes: 23 additions & 6 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
DIFF := "diff"
HELM_DOCS_VERSION := env_var_or_default("HELM_DOCS_VERSION", "1.13.1")
OS := if os() == "macos" {"Darwin"} else if os() == "linux" {"Linux"} else if os() == "windows" {"Windows"} else {""}
ARCH := if arch() == "aarch64" {"arm64"} else if arch() == "x86_64" {"x86_64"} else {""}

setup:
#!/bin/bash
# TODO: idempotency

# TODO: check for macos
mkdir -p ./bin/helm-docs-1.5.0/
curl -L https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Darwin_x86_64.tar.gz | tar -xzvf - -C ./bin/helm-docs-1.5.0/
ln -s $PWD/bin/helm-docs-1.5.0/helm-docs $PWD/bin/helm-docs
set -xe
echo "Installing helm-docs version {{HELM_DOCS_VERSION}}"
mkdir -p bin
curl -L -s https://github.com/norwoodj/helm-docs/releases/download/v{{HELM_DOCS_VERSION}}/helm-docs_{{HELM_DOCS_VERSION}}_{{OS}}_{{ARCH}}.tar.gz -o bin/helm-docs.tar.gz
tar -C ./bin -xz -f bin/helm-docs.tar.gz helm-docs
rm -rf bin/helm-docs.tar.gz

update-lock:
#!/bin/bash
Expand Down Expand Up @@ -98,3 +101,17 @@ test-connect-interpreter-versions:
docker run --rm $image /bin/bash -c "command -v $ex"
done
done

push-docs:
#!/usr/bin/env bash
set -euxo pipefail
s3_args=(--dryrun)
if [[ "${GITHUB_REF:-}" == "refs/heads/main" ]] || [[ "${GITHUB_REF:-}" =~ ^refs/tags/v[0-9]{4}\.[0-9]{2}\.[0-9]+$ ]]; then
s3_args=("")
fi

# The s3 bucket is s3://docs.rstudio.com/, which is available as https://docs.posit.co/
aws s3 sync ${s3_args[*]:-} \
_site \
"s3://docs.rstudio.com/helm/"
1 change: 1 addition & 0 deletions _environment
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CURRENT_YEAR=2024
54 changes: 24 additions & 30 deletions _extensions/posit-dev/posit-docs/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
title: posit-docs
author: Ashley Henry
version: 0.2.0
quarto-requred: ">=1.3.340"
author: Ashley Henry, David Aja, Aron Atkins
version: 4.0.1
quarto-required: ">=1.3.340"
contributes:
project:
project:
type: website
website:
title:
favicon: "assets/images/favicon.svg"
bread-crumbs: true
navbar:
pinned: true
logo: "assets/images/posit-icon-fullcolor.svg"
logo-alt: "Posit Documentation"
sidebar:
style: "floating"
collapse-level: 1
search: true
pinned: false
page-footer:
left:
- text: © 2024 Posit Software, PBC
url: "https://posit.co"
center: |
Posit Product 12345
logo-alt: "Posit Documentation"
right:
- icon: book
href: https://docs.posit.co
- icon: question-circle-fill
href: https://support.posit.co/hc/en-us
- icon: lightbulb-fill
href: https://solutions.posit.co
formats:
html:
theme: [theme.scss]
link-external-icon: true
link-external-newwindow: true
toc: true
toc-expand: true
- icon: "list"
aria-label: 'Drop-down menu for additional Posit resources'
menu:
- text: "docs.posit.co"
href: "https://docs.posit.co"
- text: "Posit Support"
href: "https://support.posit.co/hc/en-us/"
search:
copy-button: true
show-item-context: true
format:
html:
theme:
light: [theme.scss]
dark: [theme-dark.scss]
link-external-icon: true
link-external-newwindow: true
toc: true
toc-expand: true
include-in-header: "assets/_analytics.html"
37 changes: 37 additions & 0 deletions _extensions/posit-dev/posit-docs/_posit-colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Posit Color definitions */
$posit-blue: #447099;
$posit-light-blue-1: #d1dbe5;
$posit-light-blue-2: #a2b8cb;
$posit-light-blue-3: #7494b1;
$posit-dark-blue-1: #305775;
$posit-dark-blue-2: #213d4f;

$posit-orange: #ee6331;
$posit-light-orange-1: #edccbf;
$posit-light-orange-2: #eba38c;
$posit-dark-orange-1: #ab4d26;
$posit-dark-orange-2: #80361c;
$posit-dark-orange-3: #451f12;

$posit-gray: #404041;
$posit-light-gray-1: #c2c2c4;
$posit-light-gray-2: #949494;
$posit-dark-gray-1: #333333;

$posit-teal: #419599;
$posit-light-teal-1: #c2d9d9;
$posit-light-teal-2: #94bdbf;
$posit-light-teal-3: #70a3a6;
$posit-dark-teal-1: #297075;
$posit-dark-teal-2: #1f4f4f;
$posit-dark-teal-3: #122b2b;

$posit-green: #72994e;

$posit-burgundy: #9a4665;
$posit-light-burgundy-1: #d9c4cc;
$posit-light-burgundy-2: #bf96a3;
$posit-light-burgundy-3: #a67380;
$posit-dark-burgundy-1: #78384f;
$posit-dark-burgundy-2: #542938;
$posit-dark-burgundy-3: #2e171f;
40 changes: 40 additions & 0 deletions _extensions/posit-dev/posit-docs/assets/_analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- Google Analytics 4 (G-XXXXXXXXXX) -->
<script>
/* Use GA when hosted by our public docs site, not when installed. */
if (location.href.indexOf("docs.posit.co") >= 0) {
window.dataLayer = window.dataLayer || []
function gtag() { dataLayer.push(arguments) }
/* Set up integration and send page view */
gtag("js", new Date())
gtag("config", "GTM-KHBDBW7")

/* Register virtual event handlers */
document.addEventListener("DOMContentLoaded", function () {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function () {
if (this.value) {
gtag("event", "search", { search_term: this.value })
}
})
}

/* Send page view on location change */
if (typeof location$ !== "undefined")
location$.subscribe(function (url) {
gtag("config", "GTM-KHBDBW7", {
page_path: url.pathname
})
})
})
/* Create script tag */
var script = document.createElement("script")
script.async = true
script.src = "https://www.googletagmanager.com/gtag/js?id=GTM-KHBDBW7"

/* Inject script tag */
var container = document.getElementsByTagName("head")[0]
var firstChild = container.firstChild
container.insertBefore(script, firstChild)
}
</script>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4567386

Please sign in to comment.