Unverified Commit ad7ae5c4 authored by one's avatar one Committed by GitHub
Browse files

Merge pull request #1 from alephpiece/one/deploy-docs

Configure GitHub Pages
parent e1d791d2
......@@ -3,39 +3,44 @@ name: GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
- release/*
- dtk
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
docs-build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Test docs build
node-version: '18'
cache: npm
cache-dependency-path: website/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build docs site
run: |
cd website
npm ci
npm run build
- name: Prepare ssh key
uses: webfactory/ssh-agent@v0.5.0
if: ${{ github.event_name == 'push' }}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
ssh-private-key: ${{ secrets.GH_PAGES_KEY }}
- name: Publish to GitHub Pages
if: ${{ github.event_name == 'push' }}
env:
GIT_USER: ${{ secrets.GH_PAGES_USERNAME }}
USE_SSH: true
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
cd website
npm run deploy
path: website/build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
......@@ -8,12 +8,12 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
module.exports = {
title: 'SuperBench',
tagline: 'Hardware and Software Benchmarks for AI Systems',
url: 'https://microsoft.github.io',
url: 'https://alephpiece.github.io',
baseUrl: '/superbenchmark/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'microsoft',
organizationName: 'alephpiece',
projectName: 'superbenchmark',
themeConfig: {
navbar: {
......@@ -43,7 +43,7 @@ module.exports = {
},
// right
{
href: 'https://github.com/microsoft/superbenchmark',
href: 'https://github.com/alephpiece/superbenchmark',
label: 'GitHub',
position: 'right',
},
......@@ -74,11 +74,11 @@ module.exports = {
items: [
{
label: 'Issues',
href: 'https://github.com/microsoft/superbenchmark/issues',
href: 'https://github.com/alephpiece/superbenchmark/issues',
},
{
label: 'Discussion',
href: 'https://github.com/microsoft/superbenchmark/discussions',
href: 'https://github.com/alephpiece/superbenchmark/discussions',
},
],
},
......@@ -91,7 +91,7 @@ module.exports = {
},
{
label: 'GitHub',
href: 'https://github.com/microsoft/superbenchmark',
href: 'https://github.com/alephpiece/superbenchmark',
},
],
},
......@@ -101,13 +101,8 @@ module.exports = {
announcementBar: {
id: 'supportus',
content:
'📢 <a href="https://microsoft.github.io/superbenchmark/blog/release-sb-v0.11">v0.12.0</a> has been released! ' +
'⭐️ If you like SuperBench, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/microsoft/superbenchmark">GitHub</a>! ⭐️',
},
algolia: {
apiKey: '6809111d3dabf59fe562601d591d7c53',
indexName: 'superbenchmark',
contextualSearch: true,
'This site is published from the <code>dtk</code> branch of ' +
'<a target="_blank" rel="noopener noreferrer" href="https://github.com/alephpiece/superbenchmark">alephpiece/superbenchmark</a>.',
},
prism: {
theme: lightCodeTheme,
......@@ -122,11 +117,11 @@ module.exports = {
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/microsoft/superbenchmark/edit/main/website/',
editUrl: 'https://github.com/alephpiece/superbenchmark/edit/dtk/',
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/microsoft/superbenchmark/edit/main/website/',
editUrl: 'https://github.com/alephpiece/superbenchmark/edit/dtk/website/',
},
theme: {
customCss: require.resolve('./src/css/index.css'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment