Skip to content

Commit

Permalink
Merge pull request #88 from vauxia/feature/PGOV-563-Github-pages
Browse files Browse the repository at this point in the history
Feature/pgov 563 GitHub pages
  • Loading branch information
iris-i authored Feb 11, 2025
2 parents b6db0ec + 33c1055 commit 7ff6298
Show file tree
Hide file tree
Showing 7 changed files with 1,233 additions and 8 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/publish-docs-to-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Docusarus docs to Github Pages.

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
paths: ["docs/**"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
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:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache-dependency-path: docs/package-lock.json
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm install --frozen-lockfile --non-interactive
working-directory: 'docs/'
- name: Build
run: npm run build
working-directory: 'docs/'
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload generated docs
path: 'docs/build/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4






2 changes: 1 addition & 1 deletion docs/docs/development/back-end/airtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ modules is in `web/modules/custom/pgov_migrate`. The module also contains
preconfigured migrations and default content, which will be added to the site
each time it's rebuilt.

Migrations can be listed using `drush migrate:status` (this may take some time)
Migrations can be listed using `ddev drush migrate:status` (this may take some time)
Migrations can be executed using `ddev migrate` (local environment) or
`bin/migrate` (hosted environment).
File renamed without changes.
14 changes: 8 additions & 6 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config: Config = {
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: '/pgov-cms/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand All @@ -30,18 +30,20 @@ const config: Config = {
defaultLocale: 'en',
locales: ['en'],
},

markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
presets: [
[
'classic',
{
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
routeBasePath: '/',
editUrl:
'https://github.com/CivicActions/pgov-cms/tree/main/',
editUrl: 'https://github.com/CivicActions/pgov-cms/blob/main/docs/',
},
/** Will not use blog on this site.
blog: {
Expand Down Expand Up @@ -98,7 +100,7 @@ const config: Config = {
items: [
{
label: 'Overview',
to: '/docs/',
to: '/pgov-cms/',
},
],
},
Expand Down
Loading

0 comments on commit 7ff6298

Please sign in to comment.