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