Skip to content

fix: πŸ› TIAS relative path #2

fix: πŸ› TIAS relative path

fix: πŸ› TIAS relative path #2

Workflow file for this run

name: OpenRPC (Build & Deploy GitHub pages)
on:
push:
branches:
- main
- chore/docs-rpc-publisher
workflow_dispatch:
jobs:
deploy:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs/rpc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install open-rpc
run: npm install -g @open-rpc/generator
- name: Update Openrpc (JSON)
run: open-rpc-generator generate -c openrpc.json
- name: Generate OpenRPC Site (Gatsby)
run: open-rpc-generator generate -t docs -d openrpc.json -l gatsby
- name: Setup config for IPFS (relative paths)
run: |
echo "module.exports = {
pathPrefix: '__GATSBY_IPFS_PATH_PREFIX__',
siteMetadata: {
title: 'Fleek Network JSON-RPC',
description: 'This API enables JSON-RPC interaction with Fleek Network Node',
logoUrl: 'https://raw.githubusercontent.com/open-rpc/design/master/icons/open-rpc-logo-noText/open-rpc-logo-noText%20(PNG)/256x256.png',
primaryColor: '#3f51b5', //material-ui primary color
secondaryColor: '#f50057', //material-ui secondary color
author: '',
menuLinks: [
{
name: 'home',
link: '/',
ignoreNextPrev: true
},
{
name: 'API Documentation',
link: '/api-documentation'
}
],
footerLinks: [
{
name: 'OpenRPC',
link: 'https://open-rpc.org'
}
]
},
plugins: [
'@xops.net/gatsby-openrpc-theme',
'gatsby-plugin-ipfs',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'pristine-site',
short_name: 'pristine-site',
start_url: '/',
background_color: 'transparent',
theme_color: '#3f51b5',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
},
}
],
}" > ./docs/gatsby/gatsby-config.js
- name: Install dependencies
working-directory: ./docs/rpc/docs/gatsby
run: npm install
- name: Build docs
working-directory: ./docs/rpc/docs/gatsby
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/rpc/docs/gatsby/public
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com