Skip to content

Commit

Permalink
Merge branch 'main' into 732-docs-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanalvizo committed Aug 29, 2024
2 parents c6d3241 + bba5536 commit a252aed
Show file tree
Hide file tree
Showing 85 changed files with 5,296 additions and 15,759 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build-main-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
name: Build Main Docs
name: Build Docs

on:
workflow_dispatch:
inputs:
package:
description: 'Name of the package to build docs for.'
required: true
type: choice
options:
- 'plotly-express'
- 'ui'
version:
description: 'Version of the package to build docs for. This only affects where the docs are synced and not the actual docs built so in most cases this should be "main".'
required: true
type: string
default: 'main'
event_name:
description: 'Event name to determine if the docs should be synced. Keep this as "push" to sync the docs.'
required: true
type: choice
default: 'push'
options:
- 'push'
- 'test'
workflow_call:
inputs:
package:
description: The plugin to publish the docs for
required: true
type: string
version:
description: The version of the plugin to publish the docs for
type: string
default: 'main'
event_name:
description: The event name that triggered the workflow
required: true
Expand Down Expand Up @@ -40,5 +66,5 @@ jobs:
secrets: inherit
with:
package: ${{ inputs.package }}
version: 'main'
version: ${{ inputs.version }}
event_name: ${{ inputs.event_name }}
15 changes: 7 additions & 8 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ jobs:
cat << EOF > $HOME/.config/rclone/rclone.conf
[plugindocs]
type = s3
provider = Cloudflare
access_key_id = ${{ secrets.DOCS_CLOUDFLARE_ACCESS_KEY_ID }}
secret_access_key = ${{ secrets.DOCS_CLOUDFLARE_SECRET_ACCESS_KEY }}
endpoint = ${{ secrets.DOCS_CLOUDFLARE_ENDPOINT }}
no_check_bucket = true
acl = private
type = google cloud storage
service_account_file = $HOME/credentials.json
project_number = ${{ secrets.DOCS_GOOGLE_CLOUD_PROJECT_NUMBER }}
bucket_policy_only = true
EOF
echo ${{ secrets.DOCS_GOOGLE_CLOUD_CREDENTIALS }} | base64 -d > $HOME/credentials.json
- name: Sync docs
if: inputs.event_name == 'push'
run: rclone sync plugins/${{ inputs.package }}/docs/build/markdown/ plugindocs:website/deephaven/deephaven-plugins/${{ inputs.package }}/${{ inputs.version }}/
run: rclone sync plugins/${{ inputs.package }}/docs/build/markdown/ plugindocs:${{ secrets.DOCS_GOOGLE_CLOUD_BUCKET }}/deephaven/deephaven-plugins/${{ inputs.package }}/${{ inputs.version }}/
2 changes: 1 addition & 1 deletion cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ci = { changelog_title = "", omit_from_changelog = true }

[changelog]
path = "CHANGELOG.md"
template = "remote"
template = "deephaven-changelog-template"
remote = "github.com"
repository = "deephaven-plugins"
owner = "deephaven"
Expand Down
54 changes: 54 additions & 0 deletions deephaven-changelog-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{# Tera templates are used to generate the changelog content -#}
{# https://keats.github.io/tera/docs/ -#}
{# Based on Cocogittos remote template, but adds breaking changes: https://github.com/cocogitto/cocogitto/blob/main/src/conventional/changelog/template/remote -#}
{# First display all the breaking changes -#}
{% set breaking_commits = commits | filter(attribute="breaking_change", value=true) -%}
{% if breaking_commits | length > 0 -%}
#### ⚠ Breaking Changes

{% for commit in breaking_commits -%}
{% set commit_link = repository_url ~ "/commit/" ~ commit.id -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
{% for footer in commit.footer | filter(attribute="token", value="BREAKING CHANGE") -%}
- {{ footer.content }} - ([{{shorthand}}]({{ commit_link }}))
{% endfor -%}
{% endfor -%}
{% endif %}

{# Now group the rest of the commits and display them -#}
{% set typed_commit_map = commits | group_by(attribute="type") -%}
{% set type_order = ["Features", "Bug Fixes", "Performance Improvements", "Miscellaneous Chores", "Documentation", "Refactoring", "Build system", "Style"] -%}
{% for type in type_order -%}
{% if typed_commit_map[type] -%}
#### {{ type | upper_first }}
{% for scope, scoped_commits in typed_commit_map[type] | group_by(attribute="scope") -%}

{% for commit in scoped_commits | sort(attribute="scope") -%}
{% if commit.author and repository_url -%}
{% set author = "@" ~ commit.author -%}
{% set author_link = platform ~ "/" ~ commit.author -%}
{% set author = "[" ~ author ~ "](" ~ author_link ~ ")" -%}
{% else -%}
{% set author = commit.signature -%}
{% endif -%}
{% set commit_link = repository_url ~ "/commit/" ~ commit.id -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- **({{ scope }})** {{ commit.summary }} - ([{{shorthand}}]({{ commit_link }})) - {{ author }}
{% endfor -%}

{% endfor -%}

{% for commit in typed_commit_map[type] | unscoped -%}
{% if commit.author and repository_url -%}
{% set author = "@" ~ commit.author -%}
{% set author_link = platform ~ "/" ~ commit.author -%}
{% set author = "[" ~ author ~ "](" ~ author_link ~ ")" -%}
{% else -%}
{% set author = commit.signature -%}
{% endif -%}
{% set commit_link = repository_url ~ "/commit/" ~ commit.id -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- {{ commit.summary }} - ([{{shorthand}}]({{ commit_link }})) - {{ author }}
{% endfor -%}
{% endif %}
{% endfor -%}
Loading

0 comments on commit a252aed

Please sign in to comment.