mirror of
https://github.com/paperclipai/docs.git
synced 2026-11-07 06:15:59 -10:00
Add GitHub Pages canary deploy
This commit is contained in:
1 parent
4a58ef4aad
commit
1b9de03997
2 files changed
+72
-2
No files matched your search
@@ -0,0 +1,70 @@
|
||||
name: Deploy canary to GitHub Pages
|
||||
|
||||
run-name: Deploy canary from ${{ github.ref_name }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
site-url:
|
||||
description: GitHub Pages origin for this repository
|
||||
required: true
|
||||
default: https://paperclipai.github.io
|
||||
base-url:
|
||||
description: Docusaurus base path for this repository Pages site
|
||||
required: true
|
||||
default: /docs/
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages-canary
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docusaurus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Typecheck
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Build site
|
||||
run: npm run build
|
||||
env:
|
||||
DOCUSAURUS_URL: ${{ inputs.site-url }}
|
||||
DOCUSAURUS_BASE_URL: ${{ inputs.base-url }}
|
||||
|
||||
- name: Configure Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload Pages artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -11,8 +11,8 @@ const config: Config = {
|
||||
v4: true,
|
||||
},
|
||||
|
||||
url: 'https://docs.paperclip.ing',
|
||||
baseUrl: '/',
|
||||
url: process.env.DOCUSAURUS_URL ?? 'https://docs.paperclip.ing',
|
||||
baseUrl: process.env.DOCUSAURUS_BASE_URL ?? '/',
|
||||
|
||||
organizationName: 'paperclipai',
|
||||
projectName: 'docs',
|
||||
|
||||
Reference in new issue
Block a user