Skip to content

Commit 7f8478f

Browse files
authored
Merge pull request #19 from visto9259/1.2.x
Updated CI workflows for php 8.4. Added test docusaurus website to test documenation CI workflows
2 parents 389ae05 + 8c713ef commit 7f8478f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+10688
-33
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build GitHub Pages
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
working-directory: ./docs
7+
8+
on:
9+
push:
10+
branches:
11+
- 'main'
12+
paths:
13+
- 'docs/**'
14+
workflow_dispatch:
15+
16+
17+
jobs:
18+
deploy:
19+
name: Build and Deploy to GitHub Pages
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
shell: bash
24+
working-directory: ./docs
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 18
30+
cache: yarn
31+
cache-dependency-path: docs/yarn.lock
32+
- name: Install dependencies
33+
run: yarn install --frozen-lockfile
34+
- name: Build website
35+
run: yarn build
36+
- name: Deploy to GitHub Pages
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
# Build output to publish to the `gh-pages` branch:
41+
publish_dir: ./docs/build
42+
# The following lines assign commit authorship to the official
43+
# GH-Actions bot for deploys to `gh-pages` branch:
44+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
45+
# The GH actions bot is used by default if you didn't specify the two fields.
46+
# You can swap them out with your own user credentials.
47+
user_name: github-actions[bot]
48+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.github/workflows/continous-integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: "Continuous Integration"
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- 'docs/**'
57
push:
68
branches:
79
tags:
10+
paths-ignore:
11+
- 'docs/**'
812

913
jobs:
1014
ci:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Continuous Integration Docs
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
working-directory: ./docs
7+
8+
on:
9+
pull_request:
10+
paths:
11+
- 'docs/**'
12+
push:
13+
paths:
14+
- 'docs/**'
15+
jobs:
16+
test-deploy:
17+
name: Build GitHub Pages
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 18
24+
cache: yarn
25+
cache-dependency-path: docs/yarn.lock
26+
- name: Install dependencies
27+
run: yarn install --frozen-lockfile
28+
- name: Test build website
29+
run: yarn build

.laminas-ci.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ignore_php_platform_requirements": {
3+
"8.4": true
4+
}
5+
}

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,41 @@
1-
# Documentation Website
1+
# Website
22

3-
The 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.
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
174

185
### Installation
196

20-
On your local fork of the Documentation, use `yarn` to install
21-
the Docusaurus dependencies.
22-
237
```
248
$ yarn
259
```
2610

2711
### Local Development
2812

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.
13+
```
14+
$ yarn start
15+
```
3216

33-
Changes to the navigation and footer are made to the `docusauraus.config.js` file.
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.
3418

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

3721
```
38-
$ yarn start
22+
$ yarn build
3923
```
4024

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.
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
4326

44-
## Test builds
27+
### Deployment
4528

46-
A GitHub action is define to test builds. It will run on push to your fork.
29+
Using SSH:
4730

48-
You may have to enable workflows on your fork before they are run.
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
4934

50-
## Submit changes
35+
Not using SSH:
5136

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

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.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
slug: first-blog-post
3+
title: First Blog Post
4+
authors: [slorber, yangshun]
5+
tags: [hola, docusaurus]
6+
---
7+
8+
Lorem ipsum dolor sit amet...
9+
10+
<!-- truncate -->
11+
12+
...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
slug: long-blog-post
3+
title: Long Blog Post
4+
authors: yangshun
5+
tags: [hello, docusaurus]
6+
---
7+
8+
This is the summary of a very long blog post,
9+
10+
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
11+
12+
<!-- truncate -->
13+
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
15+
16+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17+
18+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
19+
20+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
21+
22+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
23+
24+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
25+
26+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
27+
28+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
29+
30+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
31+
32+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
33+
34+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
35+
36+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
37+
38+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
39+
40+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
41+
42+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
43+
44+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
slug: mdx-blog-post
3+
title: MDX Blog Post
4+
authors: [slorber]
5+
tags: [docusaurus]
6+
---
7+
8+
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9+
10+
:::tip
11+
12+
Use the power of React to create interactive blog posts.
13+
14+
:::
15+
16+
{/* truncate */}
17+
18+
For example, use JSX to create an interactive button:
19+
20+
```js
21+
<button onClick={() => alert('button clicked!')}>Click me!</button>
22+
```
23+
24+
<button onClick={() => alert('button clicked!')}>Click me!</button>
Loading

docs/blog/2021-08-26-welcome/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
authors: [slorber, yangshun]
5+
tags: [facebook, hello, docusaurus]
6+
---
7+
8+
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
9+
10+
Here are a few tips you might find useful.
11+
12+
<!-- truncate -->
13+
14+
Simply add Markdown files (or folders) to the `blog` directory.
15+
16+
Regular blog authors can be added to `authors.yml`.
17+
18+
The blog post date can be extracted from filenames, such as:
19+
20+
- `2019-05-30-welcome.md`
21+
- `2019-05-30-welcome/index.md`
22+
23+
A blog post folder can be convenient to co-locate blog post images:
24+
25+
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
26+
27+
The blog supports tags as well!
28+
29+
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.

docs/blog/authors.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
yangshun:
2+
name: Yangshun Tay
3+
title: Front End Engineer @ Facebook
4+
url: https://github.com/yangshun
5+
image_url: https://github.com/yangshun.png
6+
page: true
7+
socials:
8+
x: yangshunz
9+
github: yangshun
10+
11+
slorber:
12+
name: Sébastien Lorber
13+
title: Docusaurus maintainer
14+
url: https://sebastienlorber.com
15+
image_url: https://github.com/slorber.png
16+
page:
17+
# customize the url of the author page at /blog/authors/<permalink>
18+
permalink: '/all-sebastien-lorber-articles'
19+
socials:
20+
x: sebastienlorber
21+
linkedin: sebastienlorber
22+
github: slorber
23+
newsletter: https://thisweekinreact.com

docs/blog/tags.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
facebook:
2+
label: Facebook
3+
permalink: /facebook
4+
description: Facebook tag description
5+
6+
hello:
7+
label: Hello
8+
permalink: /hello
9+
description: Hello tag description
10+
11+
docusaurus:
12+
label: Docusaurus
13+
permalink: /docusaurus
14+
description: Docusaurus tag description
15+
16+
hola:
17+
label: Hola
18+
permalink: /hola
19+
description: Hola tag description

docs/docs/intro.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Tutorial Intro
6+
7+
Let's discover **Docusaurus in less than 5 minutes**.
8+
9+
## Getting Started
10+
11+
Get started by **creating a new site**.
12+
13+
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
14+
15+
### What you'll need
16+
17+
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
18+
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
19+
20+
## Generate a new site
21+
22+
Generate a new Docusaurus site using the **classic template**.
23+
24+
The classic template will automatically be added to your project after you run the command:
25+
26+
```bash
27+
npm init docusaurus@latest my-website classic
28+
```
29+
30+
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
31+
32+
The command also installs all necessary dependencies you need to run Docusaurus.
33+
34+
## Start your site
35+
36+
Run the development server:
37+
38+
```bash
39+
cd my-website
40+
npm run start
41+
```
42+
43+
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
44+
45+
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
46+
47+
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.

0 commit comments

Comments
 (0)