Skip to content

Commit

Permalink
adds docs build gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding committed Aug 8, 2024
1 parent d8783dc commit b904241
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy Docs

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Build
run: yarn build
# 👆 Build steps
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# 👇 Specify build output path
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
11 changes: 7 additions & 4 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@
import {themes as prismThemes} from 'prism-react-renderer';
const { join } = require('path');

const organizationName = "ChainSafe";
const projectName = "WebZjs";

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
url: `https://${organizationName}.github.io`,
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: `/${projectName}/`,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'ChainSafe', // Usually your GitHub org/user name.
projectName: 'WebZjs', // Usually your repo name.
organizationName, // Usually your GitHub org/user name.
projectName, // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand Down

0 comments on commit b904241

Please sign in to comment.