Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build-test.yaml #194

Merged
merged 4 commits into from
Jul 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Serve Docusaurus Website

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-serve:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js 20.14
uses: actions/setup-node@v2
with:
node-version: '20.14'

- name: Install dependencies
run: npm install

- name: Build website
run: npm run build

- name: Start Docusaurus server
run: npm run serve -- --host 0.0.0.0

- name: Wait for Docusaurus to start
run: sleep 5 # Adjust as needed based on your server startup time

- name: Test Docusaurus website
run: |
curl -IsS http://localhost:3000 | head -n 1 | grep "200 OK"

- name: Shutdown Docusaurus server
run: npm run clear # Replace with your shutdown command if needed
Loading