Skip to content

Commit

Permalink
feat: starlight example
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzoh committed Jan 24, 2025
1 parent 688db2b commit 001ffa4
Show file tree
Hide file tree
Showing 18 changed files with 361 additions and 104 deletions.
49 changes: 8 additions & 41 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,31 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages
name: Deploy site to GitHub Pages

on:
push:
tags:
- 'v*'

# Allows you to run this workflow manually from the Actions tab
branches: [ main ]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout your repository using git
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: |
npm run build
touch src/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: src/.vitepress/dist
- name: Install, build, and upload your site
uses: withastro/action@v3

# Deployment job
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
8 changes: 8 additions & 0 deletions .idea/.gitignore

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

4 changes: 4 additions & 0 deletions .idea/vcs.xml

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

58 changes: 36 additions & 22 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
// @ts-check
import { defineConfig } from 'astro/config';
import {defineConfig} from 'astro/config';
import starlight from '@astrojs/starlight';

import relativeLinks from 'astro-relative-links';

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
social: {
github: 'https://github.com/withastro/starlight',
},
sidebar: [
{
label: 'Guides',
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Example Guide', slug: 'guides/example' },
],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
},
],
}),
],
site: 'https://jobtrek.github.io/', // TODO: Change to your github url
base: 'progress-report', // TODO: Change to your repo name
integrations: [starlight({
title: 'Progress report',
social: {
github: 'https://github.com/jobtrek/progress-report', // TODO: Change to your repo url
},
editLink: {
baseUrl: 'https://github.com/jobtrek/progress-report/edit/main/docs/', // TODO: before /edit, change to your repo url
},
customCss: [
// Relative path to your custom CSS file
'./src/styles/theme.css',
],
sidebar: [
{
label: 'Introduction',
link: '/introduction',
},
{
label: 'Projects',
autogenerate: {directory: 'projects'}
},
{
label: 'Technologies',
autogenerate: {directory: 'technologies'},
},
{
label: 'Tools',
autogenerate: {directory: 'tools'},
}
],
})],
});
Loading

0 comments on commit 001ffa4

Please sign in to comment.