Skip to content

Commit

Permalink
Fix deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
BadgerHobbs committed Mar 9, 2024
1 parent 18189e7 commit 599d084
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/deploy-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,16 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Setup d2-diagrams directory
run: |
sudo mkdir /d2-diagrams
sudo chown -R $(whoami) /d2-diagrams

- name: Build with VitePress
run: npm run docs:build
run: |
BASE_PATH="/vitepress-plugin-d2/"
sudo npm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
path: ./example/.vitepress/dist

# Deployment job
deploy:
Expand Down
4 changes: 4 additions & 0 deletions example/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { defineConfig } from 'vitepress'
import dotenv from "dotenv";

dotenv.config();

// Import D2 diagram plugin
import d2 from 'vitepress-plugin-d2';
Expand All @@ -8,6 +11,7 @@ import { Layout, Theme, FileType } from 'vitepress-plugin-d2/dist/config';
export default defineConfig({
title: "VitePress Plugin D2 Example",
description: "VitePress D2 plugin example site.",
base: process.env.BASE_PATH || "/",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
footer: {
Expand Down
13 changes: 13 additions & 0 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"dotenv": "^16.4.5",
"vitepress": "^1.0.0-rc.45",
"vitepress-plugin-d2": "^1.0.0"
}
Expand Down

0 comments on commit 599d084

Please sign in to comment.