Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CD - Deploy Docusaurus to GitHub Pages

on:
push:
branches:
- main

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

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

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Docusaurus site
run: npm run build

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

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

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config: Config = {
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'opiasec', // Usually your GitHub org/user name.
projectName: 'appseclabs', // Usually your repo name.
projectName: 'documentation', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand Down Expand Up @@ -66,7 +66,7 @@ const config: Config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
'https://github.com/AppSec-Digital/documentation/tree/main/',
},
blog: {
showReadingTime: true,
Expand All @@ -77,7 +77,7 @@ const config: Config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
'https://github.com/AppSec-Digital/documentation/tree/main/',
// Useful options to enforce blogging best practices
onInlineTags: 'warn',
onInlineAuthors: 'warn',
Expand Down Expand Up @@ -152,12 +152,12 @@ const config: Config = {
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
href: 'https://github.com/opiasec/documentation',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} opiasec. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
Expand Down