-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jmp-move-migration-guide
- Loading branch information
Showing
47 changed files
with
2,140 additions
and
767 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Deploy to Developer Portal Bucket | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/deploy-to-developer-portal.yml' | ||
- 'docusaurus/**' | ||
jobs: | ||
deploy: | ||
name: Deploy docs to Developer Portal Bucket | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Generate token | ||
# id: generate_token | ||
# uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 | ||
# with: | ||
# app_id: ${{ secrets.APP_ID }} | ||
# private_key: ${{ secrets.APP_PEM }} | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
#mac: sed -i '' 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx | ||
#mac: grep -rl "](/docs/" docusaurus/docs | xargs sed -i '' 's/](\/docs\//](\//g' | ||
#linux: sed -i 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx | ||
#linux: grep -rl "](/docs/" docusaurus/docs | xargs sed -i 's/](\/docs\//](\//g' | ||
- name: Make docs the homepage of this subsite | ||
run: | | ||
rm -f ./docusaurus/website/src/pages/index.tsx | ||
sed -i 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx | ||
grep -rl "](/docs/" docusaurus/docs | xargs sed -i 's/](\/docs\//](\//g' | ||
- name: Build documentation website | ||
run: npm run docs:build -- --config docusaurus.config.devportal.js | ||
|
||
- id: 'auth' | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
credentials_json: ${{ secrets.GCP_SA_KEY }} | ||
- name: Deploy to Developer Portal Bucket | ||
uses: google-github-actions/upload-cloud-storage@v1 | ||
with: | ||
path: './docusaurus/website/build/' | ||
destination: 'grafana_developer_portal/plugin-tools' | ||
parent: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 4 * * *' | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
# Number of days of inactivity before a stale Issue or Pull Request is closed. | ||
# Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. | ||
days-before-close: 14 | ||
# Number of days of inactivity before an Issue or Pull Request becomes stale | ||
days-before-stale: 90 | ||
exempt-issue-labels: no stalebot | ||
exempt-pr-labels: no stalebot | ||
operations-per-run: 100 | ||
stale-issue-label: stale | ||
stale-pr-label: stale | ||
stale-pr-message: > | ||
This pull request has been automatically marked as stale because it has not had | ||
activity in the last 90 days. It will be closed in 2 weeks if no further activity occurs. Please | ||
feel free to give a status update now, ping for review, or re-open when it's ready. | ||
Thank you for your contributions! | ||
close-pr-message: > | ||
This pull request has been automatically closed because it has not had | ||
activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. | ||
Thank you for your contributions! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
# (Mon Aug 07 2023) | ||
|
||
:tada: This release contains work from a new contributor! :tada: | ||
|
||
Thank you, Yulia Shanyrova ([@Ukochka](https://github.com/Ukochka)), for all your work! | ||
|
||
#### 🚀 Enhancement | ||
|
||
- `@grafana/[email protected]`, `@grafana/[email protected]` | ||
- sign-plugin: GRAFANA_ACESS_POLICY_TOKEN has been added instead of GRAFANA_API_KEY [#331](https://github.com/grafana/plugin-tools/pull/331) ([@Ukochka](https://github.com/Ukochka)) | ||
|
||
#### 🐛 Bug Fix | ||
|
||
- Chore/fix dev portal deployment [#332](https://github.com/grafana/plugin-tools/pull/332) ([@tolzhabayev](https://github.com/tolzhabayev)) | ||
- Adding gcs pipeline [#295](https://github.com/grafana/plugin-tools/pull/295) ([@tolzhabayev](https://github.com/tolzhabayev)) | ||
|
||
#### Authors: 2 | ||
|
||
- Timur Olzhabayev ([@tolzhabayev](https://github.com/tolzhabayev)) | ||
- Yulia Shanyrova ([@Ukochka](https://github.com/Ukochka)) | ||
|
||
--- | ||
|
||
# (Wed Aug 02 2023) | ||
|
||
#### 🐛 Bug Fix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
const path = require('path'); | ||
const remarkFigureCaption = require('gridsome-remark-figure-caption'); | ||
const { grafanaPrismTheme } = require('./src/theme/prism'); | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const generalConfig = { | ||
title: 'Grafana Plugin Tools', | ||
tagline: 'Scaffold a Grafana plugin with one command', | ||
baseUrl: 'plugin-tools/', | ||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
favicon: 'img/favicon.png', | ||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'grafana', // Usually your GitHub org/user name. | ||
projectName: 'plugin-tools', // Usually your repo name. | ||
|
||
// Even if you don't use internalization, you can use this field to set useful | ||
// metadata like html lang. For example, if your site is Chinese, you may want | ||
// to replace "en" with "zh-Hans". | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: ['en'], | ||
}, | ||
}; | ||
|
||
const plugins = [ | ||
[ | ||
'./plugins/docusaurus-custom-webpack-plugin', | ||
{ | ||
resolve: { | ||
alias: { | ||
'@snippets': path.resolve(__dirname, '..', 'docs', 'snippets'), | ||
'@shared': path.resolve(__dirname, '..', 'docs', 'shared'), | ||
}, | ||
}, | ||
}, | ||
], | ||
]; | ||
|
||
const presetsDocs = { | ||
path: '../docs', | ||
exclude: ['**/snippets/**', '**/shared/**', '**/drafts/**'], | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: 'https://github.com/grafana/plugin-tools/edit/main/docusaurus/website', | ||
beforeDefaultRemarkPlugins: [ | ||
[ | ||
remarkFigureCaption, | ||
{ | ||
figureClassName: 'md-figure-block', | ||
imageClassName: 'md-figure-image', | ||
captionClassName: 'md-figure-caption', | ||
}, | ||
], | ||
], | ||
}; | ||
const presetsTheme = { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}; | ||
|
||
const themeConfigNavbar = { | ||
title: 'Grafana Plugin Tools', | ||
logo: { | ||
alt: 'Grafana Logo', | ||
src: 'img/logo.svg', | ||
}, | ||
items: [ | ||
{ | ||
type: 'doc', | ||
docId: 'get-started/get-started', | ||
position: 'right', | ||
label: 'Docs', | ||
}, | ||
{ href: 'https://community.grafana.com/c/plugin-development/30', label: 'Help', position: 'right' }, | ||
{ | ||
href: 'https://www.github.com/grafana/plugin-tools', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}; | ||
|
||
const themeConfigFooter = { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Get Started', | ||
to: '/docs/get-started', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Stack Overflow', | ||
href: 'https://stackoverflow.com/questions/tagged/grafana', | ||
}, | ||
{ | ||
label: 'Github Discussions', | ||
href: 'https://www.github.com/grafana/plugin-tools/discussions', | ||
}, | ||
{ | ||
label: 'Grafana Community Forums', | ||
href: 'https://community.grafana.com/c/plugin-development/30', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Social', | ||
items: [ | ||
{ | ||
label: 'GitHub', | ||
href: 'https://www.github.com/grafana/plugin-tools', | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: `Copyright © ${new Date().getFullYear()} Grafana Labs. Built with Docusaurus.`, | ||
}; | ||
|
||
const themeConfigPrism = { | ||
theme: grafanaPrismTheme, | ||
}; | ||
const themeConfigColorMode = { | ||
defaultMode: 'dark', | ||
disableSwitch: true, | ||
respectPrefersColorScheme: false, | ||
}; | ||
|
||
module.exports = { | ||
generalConfig, | ||
plugins, | ||
presetsDocs, | ||
presetsTheme, | ||
themeConfigNavbar, | ||
themeConfigFooter, | ||
themeConfigPrism, | ||
themeConfigColorMode, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// @ts-check | ||
// Note: type annotations allow type checking and IDEs autocompletion | ||
|
||
const { | ||
generalConfig, | ||
plugins, | ||
presetsDocs, | ||
presetsTheme, | ||
themeConfigNavbar, | ||
themeConfigFooter, | ||
themeConfigPrism, | ||
themeConfigColorMode, | ||
} = require('./docusaurus.config.base'); | ||
|
||
|
||
// Replace docs link in footer so builds don't have broken links. | ||
const [docs, ...rest] = themeConfigFooter.links; | ||
const footerConfig = { | ||
...themeConfigFooter, | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Get Started', | ||
to: '/', | ||
}, | ||
], | ||
}, | ||
...rest, | ||
], | ||
}; | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
...generalConfig, | ||
url: 'https://devportal.grafana-dev.net/', | ||
|
||
plugins: plugins, | ||
|
||
presets: [ | ||
[ | ||
'classic', | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
docs: { | ||
...presetsDocs, | ||
routeBasePath: '/', | ||
}, | ||
theme: presetsTheme, | ||
blog: false, | ||
}), | ||
], | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
navbar: themeConfigNavbar, | ||
footer: footerConfig, | ||
prism: themeConfigPrism, | ||
colorMode: themeConfigColorMode, | ||
}), | ||
}; | ||
|
||
module.exports = config; |
Oops, something went wrong.