Skip to content

Commit

Permalink
feat: docs -> github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hec7orci7o committed Jan 28, 2025
1 parent 6736abd commit a363a2b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# 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.
concurrency:
group: "pages"
cancel-in-progress: true

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: Setup Pages
uses: actions/configure-pages@v5

- name: Install dependencies
run: npm install @redocly/cli@latest
- name: Generate documentation
run: npm run docs:generate

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './redoc-static.html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"lint": "standard --fix",
"test": "vitest",
"coverage": "vitest run --coverage",
"docs:build": "redocly bundle -o dist/bundle.yaml",
"docs:build": "redocly bundle -o dist/bundle.yaml sample@v1",
"docs:start": "redocly preview-docs",
"docs:generate": "npx @redocly/cli build-docs openapi/openapi.yaml",
"docs:test": "redocly lint",
"db:generate": "drizzle-kit generate",
"db:migrate": "dotenvx run --env-file=.env drizzle-kit migrate",
Expand Down Expand Up @@ -65,6 +66,9 @@
"lint-staged": {
"*.js": [
"npm run lint"
],
"openapi/**/*": [
"npm run docs:test"
]
}
}

0 comments on commit a363a2b

Please sign in to comment.