Skip to content

Commit

Permalink
Run build on push. Updated instructions in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
visto9259 committed Apr 10, 2024
1 parent ad6bd1e commit 9c40126
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build GitHub Pages on PRs No Deploy
name: Build GitHub Pages No Deploy

defaults:
run:
shell: bash
working-directory: ./docs

on: pull_request
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
on:
pull_request:
push:

jobs:
test-deploy:
Expand Down
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,53 @@
# Website
# LM-Commons Documentation Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
The LM-Commons Documentation Website is built using [Docusaurus](https://docusaurus.io/).

If you want to make a contribution to the documentation, please follow these
instructions:

1. Fork the `master` branch of this repository to your GitHub profile. Do not fork the `gh-pages` branch as it only contains the "built" version.
2. Create a branch to work on your changes
3. Test your changes locally (see below for instructions on how to use Docusaurus)
4. Create a Pull Request against the `master` branch to submit your changes


## Install and Develop with Docusaurus

This is not a tutorial on how to use Docusaurus. Please refer to Docusaurus documentation.

### Installation

On your local fork of the LM-Commons Documentation, use `yarn` to install
the Docusaurus dependencies.

```
$ yarn
```

### Local Development

```
$ yarn start
```
Once the dependencies are installed, you can make changes to the documentation source files.

Typically, only the files located under `/docs`, `/src` and `/blog` should be changed.

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Changes to the navigation and footer are made to the `docusauraus.config.js` file.

### Build
To test locally your changes, run:

```
$ yarn build
$ yarn start
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
This command starts a local development server and opens up a browser window. Most changes are reflected live
without having to restart the server.

Using SSH:
## Test builds

```
$ USE_SSH=true yarn deploy
```
A GitHub action is define to test builds. It will run on push to your fork.

Not using SSH:
## Submit changes

```
$ GIT_USER=<Your GitHub username> yarn deploy
```
Once you are satisfied with your changes and the `Build GitHub Pages No Deploy` action has
passed successfully, then create and submit a Pull Request against the `master` branch of
the repository.

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

0 comments on commit 9c40126

Please sign in to comment.