Skip to content

Commit

Permalink
merge docs in the main repository
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Guidée <[email protected]>
  • Loading branch information
quentinguidee committed Mar 3, 2024
1 parent 14412e9 commit cefbcad
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
21 changes: 15 additions & 6 deletions docs/.github/workflows/deploy.yml → .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
name: Deploy to Firebase Hosting
name: Docs

on: [ workflow_dispatch ]
on:
push:
branches:
- main
paths:
- '.github/workflows/docs.yml'
- 'docs/**'

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Enable corepack
run: corepack enable

- name: Install
run: npm ci
run: yarn install --frozen-lockfile

- name: Install Playwright
run: npx [email protected] install --with-deps

- name: Download OpenAPI specs
run: ./scripts/download-openapi-specs.sh
run: ./docs/scripts/download-openapi-specs.sh

- name: Build
run: npm run build
run: yarn workspace @vertex-center/docs build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
1 change: 0 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vertex-website",
"name": "@vertex-center/docs",
"private": true,
"version": "2.0.0",
"type": "module",
Expand All @@ -14,7 +14,7 @@
"@mdx-js/react": "^3.0.0",
"@mdx-js/rollup": "^3.0.0",
"@rollup/plugin-yaml": "^4.1.2",
"@vertex-center/components": "^0.7.0",
"@vertex-center/components": "workspace:packages/components",
"classnames": "^2.3.2",
"react": "^18.2.0",
"react-cookie": "^6.1.1",
Expand Down
6 changes: 3 additions & 3 deletions docs/scripts/download-openapi-specs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ find vertex-openapi/ -type f -name 'openapi.*.yaml' | while read file; do
filename=$(basename -- "$file")
dirname=$(echo "$filename" | sed -e 's/openapi.//' -e 's/.yaml//')

mkdir -p "api/$dirname/next"
cp "$file" "api/$dirname/next/openapi.yml"
mkdir -p "docs/api/$dirname/next"
cp "$file" "docs/api/$dirname/next/openapi.yml"

echo "Moved $filename to api/$dirname/next/openapi.yml"
echo "Moved $filename to docs/api/$dirname/next/openapi.yml"

done

Expand Down

0 comments on commit cefbcad

Please sign in to comment.