Skip to content

Commit

Permalink
building website by action
Browse files Browse the repository at this point in the history
Signed-off-by: Surax98 <[email protected]>
  • Loading branch information
Surax98 committed Aug 2, 2024
1 parent d3815e4 commit 5e8dd17
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/build_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,44 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload openapi.json to release
run: |
gh release upload ${{ env.release_id }} ./openapi/openapi.json --clobber
- name: Upload OpenAPI JSON as an artifact
uses: actions/upload-artifact@v4
with:
name: openapi.json
path: ./docs/openapi/openapi.json
path: ./docs/openapi/openapi.json

- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
run: |
rm ./docs/openapi/openapi.json
- name: Download artifact from the latest workflow run
uses: actions/download-artifact@v4
with:
name: openapi.json # Name of the artifact you want to download
path: ./docs/openapi # Directory where the artifact will be downloaded

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # Ensure this matches the Node.js version required by Docusaurus

- name: Install dependencies
working-directory: ./docs # Change to the directory where package.json is located
run: npm install

- name: Build Docusaurus site
working-directory: ./docs # Change to the directory where package.json is located
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build # Ensure this matches the build output directory of Docusaurus
2 changes: 1 addition & 1 deletion docs/openapi/openapi.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 5e8dd17

Please sign in to comment.