Skip to content

Commit

Permalink
Add github action for pages
Browse files Browse the repository at this point in the history
Signed-off-by: Matty Stratton <[email protected]>
  • Loading branch information
mattstratton committed Mar 4, 2024
1 parent 3c3ad2e commit 7e31bf2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/build-deploy-and-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build, Deploy to GitHub Pages and Deploy PR Preview

on:
push:
branches: [main, master]
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: write
pull-requests: write

concurrency: ci-${{ github.ref }}

jobs:
build-deploy-and-preview:
name: Build, Deploy to GitHub Pages and Deploy PR Preview
runs-on: ubuntu-latest
steps:
- name: Build, Deploy to GitHub Pages and Deploy PR Preview
uses: chvmvd/[email protected]
with:
type: docusaurus
package-manager: yarn
3 changes: 2 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const config = {
title: 'DevOpsDays Chicago Runbooks',
tagline: 'Documentation for running the DevOpsDays Chicago event',
url: 'https://docs.devopsdayschi.org',
baseUrl: '/',
// baseUrl: '/',
baseUrl: process.env.GITHUB_ACTIONS ? `${process.env.BASE_URL}/` : "/",
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
Expand Down

0 comments on commit 7e31bf2

Please sign in to comment.