Skip to content

Commit

Permalink
Add docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ddilbazTT committed Jan 20, 2025
1 parent 44cbb46 commit b091cbe
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: docs

on:
push:
branches: ["automate-pages-workflow"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install VuePress
run: |
npm install -g vuepress@next
- name: Create VuePress config
run: |
mkdir -p docs/.vuepress
cat > docs/.vuepress/config.js << 'EOF'
import { defaultTheme } from 'vuepress'
export default {
title: 'TT-Torch Documentation',
description: 'Documentation for TT-Torch',
theme: defaultTheme({
navbar: true,
sidebar: 'auto',
sidebarDepth: 3,
}),
}
EOF
- name: Build documentation
run: |
cd docs
vuepress build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vuepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit b091cbe

Please sign in to comment.