Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master
paths:
- .pages/**
- .github/workflows/main.yml
- Documentation/**
workflow_dispatch:

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

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

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./.pages
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: .pages/package.json

- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build website
run: pnpm run build --out-dir ./build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.pages/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,10 @@ ModelManifest.xml
.paket/paket.exe

# FAKE - F# Make
.fake/
.fake/

# Ignore local .docusaurus directory
.pages/.docusaurus/

# Ignore local node_modules directory
.pages/node_modules/
134 changes: 134 additions & 0 deletions .pages/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import { themes as prismThemes } from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'PowerShell Deployment (PSD)',
tagline: 'A modern, PowerShell-based extension for Microsoft Deployment Toolkit',
favicon: 'img/favicon.ico',

// Set the production URL of your site here
url: 'https://FriendsOfMDT.github.io/',
// Set the /<baseUrl>/ pathname under which your site is served
baseUrl: '/PSD/',
staticDirectories: ['static'],
// GitHub pages deployment config.
organizationName: 'FriendsOfMDT',
projectName: 'psd',

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang.
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
path: '../Documentation',
editUrl: 'https://github.com/FriendsOfMDT/PSD/edit/master/',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/psd-social-card.png',
navbar: {
title: 'PowerShell Deployment',
logo: {
alt: 'PSD Logo',
src: 'img/powershell.png',
srcDark: 'img/powershell_dark.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/FriendsOfMDT/PSD',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{ label: 'Introduction', to: '/docs/intro' },
{ label: 'Installation', to: '/docs/getting-started/installation' },
{ label: 'Toolkit Reference', to: '/docs/scripts/scripts-reference' },
],
},
{
title: 'Community',
items: [
{
label: 'GitHub Issues',
href: 'https://github.com/FriendsOfMDT/PSD/issues',
},
{
label: 'GitHub Discussions',
href: 'https://github.com/FriendsOfMDT/PSD/discussions',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/FriendsOfMDT/PSD',
},
{
label: 'Contributing',
href: 'https://github.com/FriendsOfMDT/PSD/blob/master/CONTRIBUTING.md',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Friends of MDT. Built with Docusaurus. MIT License.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['powershell', 'ini', 'bash'],
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
}),
};

export default config;
Loading