From b091cbe9358427287f350cf8de5f141bdcf5277e Mon Sep 17 00:00:00 2001 From: ddilbaz Date: Mon, 20 Jan 2025 12:15:49 +0000 Subject: [PATCH] Add docs.yml --- .github/workflows/docs.yml | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..246bc294 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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