Skip to content

Commit

Permalink
feat: gh-pages (#141)
Browse files Browse the repository at this point in the history
feat: gh-pages

Signed-off-by: FabioPinheiro <fabiomgpinheiro@gmail.com>
  • Loading branch information
FabioPinheiro authored Jul 31, 2024
1 parent 76aa071 commit 1903975
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 79 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release gh-pages docs image

on:
workflow_dispatch:
inputs:
force_deploy_ghpages:
description: "Force deploy gb-pages"
default: false
type: boolean
required: false
pull_request:
branches-ignore:
- "gh-pages"
push:
branches: [main, gh-pages-test]
tags: ["v*"]

jobs:
ghpages:
name: Deploy gh-pages
runs-on: ubuntu-latest
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/gh-pages-test')
steps:
# https://github.com/japgolly/setup-everything-scala
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # Needed for the release tag // `git fetch --tags` will also work
# - name: Setup Java and Scala
# uses: olafurpg/setup-scala@v14
# with:
# java-version: adopt@1.11
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
# - name: Setup Scala.JS
# uses: japgolly/setup-scalajs@v1
# - name: Cache sbt
# uses: coursier/cache-action@v6.3

# ### create build deploy gh-pages ###
# - name: sbt "docAll; siteAll"
# run: sbt -v "docAll; siteAll"

- name: Build
run: |
yarn install
yarn build
- name: Deploy
# https://github.com/marketplace/actions/github-pages-action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
# cname: doc.did.fmgp.app
159 changes: 80 additions & 79 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

import {themes as prismThemes} from 'prism-react-renderer';
import { themes as prismThemes } from 'prism-react-renderer';

const path = require('path')
// const {useColorMode} = require('@docusaurus/theme-common');
Expand All @@ -11,8 +11,9 @@ const path = require('path')
const config = {
title: 'Unlock the power of your digital identity.',
tagline: 'IDENTUS Docs',
url: 'https://docs.atalaprism.io',
baseUrl: '/',
// url: 'https://docs.atalaprism.io',
url: 'https://hyperledger.github.io/',
baseUrl: '/identus-docs/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
Expand Down Expand Up @@ -88,85 +89,85 @@ const config = {

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
navbar: {
logo: {
alt: ' Identus logo',
src: 'img/logo-navbar-dark.png',
srcDark: "img/logo-navbar-light.png",
},
items: [

{
type: 'doc',
docId: 'getting-started',
position: 'left',
label: 'Docs',
},
{
to: '/tutorials/',
label: 'Tutorials',
position: 'left',
activeBaseRegex: `/tutorials/`
},
{
type: 'dropdown',
label: 'API',
position: 'left',
items: [
{
to: '/agent-api/',
label: 'Agent API',
activeBaseRegex: `/agent-api/`
}
]
},
{
type: 'dropdown',
label: 'SDK',
position: 'left',
items: [
{
label: 'Edge Agent SDK Swift',
href: 'https://hyperledger.github.io/identus-edge-agent-sdk-swift/documentation/edgeagentsdk/',
},
{
to: '/identus-edge-agent-sdk-ts/sdk',
label: 'Edge Agent SDK Typescript',
activeBaseRegex: `/identus-edge-agent-sdk-ts/sdk`
},
{
label: 'Edge Agent SDK Kotlin Multiplatform',
href: 'https://hyperledger.github.io/identus-edge-agent-sdk-kmp/',
},
],
},
{
type: 'dropdown',
label: 'Resources',
position: 'left',
items: [
{
label: 'PRISM DID Spec',
href: 'https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md',
},
{
label: 'Architecture Decision Records',
href: 'pathname:///adrs',
},
],
},
],
},
footer: {
copyright: ${new Date().getFullYear()} Identus. All rights reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
{
navbar: {
logo: {
alt: ' Identus logo',
src: 'img/logo-navbar-dark.png',
srcDark: "img/logo-navbar-light.png",
},
items: [

{
type: 'doc',
docId: 'getting-started',
position: 'left',
label: 'Docs',
},
{
to: '/tutorials/',
label: 'Tutorials',
position: 'left',
activeBaseRegex: `/tutorials/`
},
{
type: 'dropdown',
label: 'API',
position: 'left',
items: [
{
to: '/agent-api/',
label: 'Agent API',
activeBaseRegex: `/agent-api/`
}
]
},
{
type: 'dropdown',
label: 'SDK',
position: 'left',
items: [
{
label: 'Edge Agent SDK Swift',
href: 'https://hyperledger.github.io/identus-edge-agent-sdk-swift/documentation/edgeagentsdk/',
},
{
to: '/identus-edge-agent-sdk-ts/sdk',
label: 'Edge Agent SDK Typescript',
activeBaseRegex: `/identus-edge-agent-sdk-ts/sdk`
},
{
label: 'Edge Agent SDK Kotlin Multiplatform',
href: 'https://hyperledger.github.io/identus-edge-agent-sdk-kmp/',
},
],
},
{
type: 'dropdown',
label: 'Resources',
position: 'left',
items: [
{
label: 'PRISM DID Spec',
href: 'https://github.com/input-output-hk/prism-did-method-spec/blob/main/w3c-spec/PRISM-method.md',
},
{
label: 'Architecture Decision Records',
href: 'pathname:///adrs',
},
],
},
],
},
footer: {
copyright: ${new Date().getFullYear()} Identus. All rights reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},

},

};

Expand Down

0 comments on commit 1903975

Please sign in to comment.