-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move module table to a GitHub page (#311)
* Add a workflow to generate module index * Add permission * Update readme * Use aka link * Update prettierignore * Ignore index.md
- Loading branch information
Showing
16 changed files
with
399 additions
and
122 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/push-auto-generate.yml → ...b/workflows/fork-on-push-brm-generate.yml
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,4 +1,4 @@ | ||
name: BRM / Automaticly Triggered BRM Generation | ||
name: On push run brm generate # fork only, optional | ||
|
||
on: | ||
push: | ||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/push-workflow-format.yml → ...orkflows/fork-on-push-format-workflow.yml
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,106 @@ | ||
name: Publish module index | ||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
contents: read | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
upload-index-data: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install packages | ||
run: npm ci | ||
|
||
- name: Generate moduleIndex.json | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const script = require("./scripts/github-actions/generate-module-index-data.js") | ||
await script({ require, core }) | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: moduleIndex.json | ||
path: moduleIndex.json | ||
|
||
- name: Log in to Azure | ||
uses: azure/login@v1 | ||
with: | ||
client-id: ${{ secrets.PUBLISH_CLIENT_ID }} | ||
tenant-id: ${{ secrets.PUBLISH_TENANT_ID }} | ||
subscription-id: ${{ secrets.PUBLISH_SUBSCRIPTION_ID }} | ||
|
||
- name: Upload to blob storage | ||
uses: azure/CLI@v1 | ||
with: | ||
inlineScript: | | ||
az storage blob upload --account-name biceplivedatasaprod --container-name bicep-cdn-live-data-container --name module-index --file moduleIndex.json --auth-mode login --overwrite | ||
build-index-page: | ||
runs-on: ubuntu-latest | ||
needs: upload-index-data | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install packages | ||
run: npm ci | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: moduleIndex.json | ||
|
||
- name: Generate index.md | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const script = require("./scripts/github-actions/generate-module-index-md.js") | ||
await script({ require, github, context, core }) | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1" | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
cache-version: 0 # Increment this number if you need to re-download cached gems | ||
working-directory: ./docs/jekyll | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v2 | ||
|
||
- name: Build with Jekyll | ||
working-directory: ./docs/jekyll | ||
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" # Outputs to the './_site' directory by default | ||
env: | ||
JEKYLL_ENV: production | ||
|
||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs/jekyll/_site | ||
|
||
deploy-index-page: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-index-page | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,2 +1,3 @@ | ||
modules/ | ||
package-lock.json | ||
docs/jekyll |
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,12 @@ | ||
# Copied from https://github.com/github/gitignore/blob/main/Jekyll.gitignore | ||
# Ignore metadata generated by Jekyll | ||
_site/ | ||
.sass-cache/ | ||
.jekyll-cache/ | ||
.jekyll-metadata | ||
|
||
# Ignore folders generated by Bundler | ||
.bundle/ | ||
vendor/ | ||
|
||
index.md |
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,11 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem "jekyll", "~> 4.3" # installed by `gem jekyll` | ||
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2 | ||
|
||
gem "just-the-docs", "0.4.2" # pinned to the current release | ||
# gem "just-the-docs" # always download the latest release | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-remote-include', :github => 'netrics/jekyll-remote-include' | ||
end |
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,88 @@ | ||
GIT | ||
remote: https://github.com/netrics/jekyll-remote-include.git | ||
revision: 39ae1a1744c8837d5ee64b11c5f982304ea940e5 | ||
specs: | ||
jekyll-remote-include (1.0.2) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
addressable (2.8.1) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
colorator (1.1.0) | ||
concurrent-ruby (1.1.10) | ||
em-websocket (0.5.3) | ||
eventmachine (>= 0.12.9) | ||
http_parser.rb (~> 0) | ||
eventmachine (1.2.7) | ||
ffi (1.15.5) | ||
ffi (1.15.5-x64-mingw-ucrt) | ||
forwardable-extended (2.6.0) | ||
http_parser.rb (0.8.0) | ||
i18n (1.12.0) | ||
concurrent-ruby (~> 1.0) | ||
jekyll (4.3.0) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
em-websocket (~> 0.5) | ||
i18n (~> 1.0) | ||
jekyll-sass-converter (>= 2.0, < 4.0) | ||
jekyll-watch (~> 2.0) | ||
kramdown (~> 2.3, >= 2.3.1) | ||
kramdown-parser-gfm (~> 1.0) | ||
liquid (~> 4.0) | ||
mercenary (>= 0.3.6, < 0.5) | ||
pathutil (~> 0.9) | ||
rouge (>= 3.0, < 5.0) | ||
safe_yaml (~> 1.0) | ||
terminal-table (>= 1.8, < 4.0) | ||
webrick (~> 1.7) | ||
jekyll-sass-converter (2.2.0) | ||
sassc (> 2.0.1, < 3.0) | ||
jekyll-seo-tag (2.8.0) | ||
jekyll (>= 3.8, < 5.0) | ||
jekyll-watch (2.2.1) | ||
listen (~> 3.0) | ||
just-the-docs (0.4.2) | ||
jekyll (>= 3.8.5) | ||
jekyll-seo-tag (>= 2.0) | ||
rake (>= 12.3.1) | ||
kramdown (2.4.0) | ||
rexml | ||
kramdown-parser-gfm (1.1.0) | ||
kramdown (~> 2.0) | ||
liquid (4.0.3) | ||
listen (3.7.1) | ||
rb-fsevent (~> 0.10, >= 0.10.3) | ||
rb-inotify (~> 0.9, >= 0.9.10) | ||
mercenary (0.4.0) | ||
pathutil (0.16.2) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (5.0.0) | ||
rake (13.0.6) | ||
rb-fsevent (0.11.2) | ||
rb-inotify (0.10.1) | ||
ffi (~> 1.0) | ||
rexml (3.2.5) | ||
rouge (4.0.0) | ||
safe_yaml (1.0.5) | ||
sassc (2.4.0) | ||
ffi (~> 1.9) | ||
terminal-table (3.0.2) | ||
unicode-display_width (>= 1.1.1, < 3) | ||
unicode-display_width (2.3.0) | ||
webrick (1.7.0) | ||
|
||
PLATFORMS | ||
arm64-darwin-21 | ||
x64-mingw-ucrt | ||
x86_64-darwin-19 | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
jekyll (~> 4.3) | ||
jekyll-remote-include! | ||
just-the-docs (= 0.4.2) | ||
|
||
BUNDLED WITH | ||
2.3.9 |
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,9 @@ | ||
title: Bicep Registry | ||
theme: just-the-docs | ||
|
||
url: https://just-the-docs.github.io | ||
|
||
aux_links: | ||
Bicep Registry Repository: https://github.com/azure/bicep-registry-modules | ||
|
||
favicon_ico: /assets/images/bicep.ico |
Binary file not shown.
Oops, something went wrong.