Skip to content

Commit 9c40126

Browse files
committed
Run build on push. Updated instructions in README.md
1 parent ad6bd1e commit 9c40126

File tree

2 files changed

+36
-24
lines changed

2 files changed

+36
-24
lines changed

.github/workflows/test-deploy-gh-pages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Build GitHub Pages on PRs No Deploy
1+
name: Build GitHub Pages No Deploy
22

33
defaults:
44
run:
55
shell: bash
66
working-directory: ./docs
77

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

1212
jobs:
1313
test-deploy:

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,53 @@
1-
# Website
1+
# LM-Commons Documentation Website
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
The LM-Commons Documentation Website is built using [Docusaurus](https://docusaurus.io/).
4+
5+
If you want to make a contribution to the documentation, please follow these
6+
instructions:
7+
8+
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.
9+
2. Create a branch to work on your changes
10+
3. Test your changes locally (see below for instructions on how to use Docusaurus)
11+
4. Create a Pull Request against the `master` branch to submit your changes
12+
13+
14+
## Install and Develop with Docusaurus
15+
16+
This is not a tutorial on how to use Docusaurus. Please refer to Docusaurus documentation.
417

518
### Installation
619

20+
On your local fork of the LM-Commons Documentation, use `yarn` to install
21+
the Docusaurus dependencies.
22+
723
```
824
$ yarn
925
```
1026

1127
### Local Development
1228

13-
```
14-
$ yarn start
15-
```
29+
Once the dependencies are installed, you can make changes to the documentation source files.
30+
31+
Typically, only the files located under `/docs`, `/src` and `/blog` should be changed.
1632

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

19-
### Build
35+
To test locally your changes, run:
2036

2137
```
22-
$ yarn build
38+
$ yarn start
2339
```
2440

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26-
27-
### Deployment
41+
This command starts a local development server and opens up a browser window. Most changes are reflected live
42+
without having to restart the server.
2843

29-
Using SSH:
44+
## Test builds
3045

31-
```
32-
$ USE_SSH=true yarn deploy
33-
```
46+
A GitHub action is define to test builds. It will run on push to your fork.
3447

35-
Not using SSH:
48+
## Submit changes
3649

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

41-
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 commit comments

Comments
 (0)