Skip to content

Commit ab5fb7e

Browse files
authored
chore: update tests to use site-generator-beta (#235)
the site-generator-beta is the new aep website. Use that in CI instead of the old one.
1 parent 39e5180 commit ab5fb7e

File tree

8 files changed

+32
-159
lines changed

8 files changed

+32
-159
lines changed

.github/workflows/publish.yaml

-27
This file was deleted.

.github/workflows/test.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
container: python:3.8
10+
container: node:20
1111
steps:
1212
- uses: actions/checkout@v3
13-
- name: Install the site-generator
14-
run: pip install -r requirements.txt
15-
- name: Build the site.
16-
run: aep-site-gen . /out
13+
- name: Generate all static pages, and build site.
14+
run: ./scripts/build.sh

CONTRIBUTING.md

+7-65
Original file line numberDiff line numberDiff line change
@@ -42,76 +42,18 @@ Some tips:
4242
## Development Environment
4343

4444
If you are contributing AEP content (rather than code) and want to be able to
45-
view it in your browser, the easiest way to do so is to run the provided
46-
development server.
45+
view it in your browser, the easiest way to do so is to run the site-generator
46+
script.
4747

4848
We use [GitHub Pages][1] to make this documentation available, and a specific
4949
[site generator][2] to build the site.
5050

51-
If you have [Docker][3] installed, clone this repository and run the `serve.sh`
52-
file at the root of the repository. This script does two things:
51+
Run `./scripts/serve.sh` to:
5352

54-
- It builds the provided Docker image (unless you already have it) and tags it
55-
as `aep-site`.
56-
- It runs the `aep-site` image.
57-
58-
The development server uses port 4000; point your web browser to
59-
`http://localhost:4000`, and you should see the site.
60-
61-
**Note:** After building the Docker image for the first time, you may
62-
experience issues if Python dependencies change underneath you. If this
63-
happens, remove your Docker image (`docker rmi aep-site`) and run `serve.sh`
64-
again.
65-
66-
### Arguments
67-
68-
Any arguments provided to `serve.sh` (or `docker run`) are forwarded (however,
69-
the current site generator does not honor any; this may change in the future).
53+
- clone the site-generator repository.
54+
- run the appropriate npm commands.
55+
- begin the dev server at port 4321.
7056

7157
### Hot reloading
7258

73-
The development server recognizes when files change (including static files)
74-
and local changes will be automatically reflected in your browser upon reload.
75-
76-
### Local Installation
77-
78-
It is possible to run the development server locally also. The general gist of
79-
how to do so correctly is:
80-
81-
- Install Python 3.8 if you do not already have it (direct install is fine, but
82-
[pyenv][5] is probably the best way if you have other Python projects).
83-
- Create a Python 3.8 [venv][6]. Once it is created, activate it in your shell
84-
(`source path/to/venv/bin/activate`).
85-
- `pip install git+https://github.com/aep-dev/site-generator.git`
86-
- `aep-site-serve .`
87-
88-
## Contributor License Agreement
89-
90-
Signing a Contributor License Agreement (CLA) is not required at this time.
91-
92-
## Code reviews
93-
94-
All submissions, including submissions by project members, require review. We
95-
use GitHub pull requests for this purpose. Consult
96-
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
97-
information on using pull requests.
98-
99-
### Formatting
100-
101-
We use [prettier][4] to format Markdown, JavaScript, and (most) HTML, in order
102-
to ensure a consistent style throughout our source. You can add prettier as a
103-
plugin in most development environments.
104-
105-
Once it is installed, you can fix formatting by running the following in the
106-
root aep.dev directory:
107-
108-
```sh
109-
prettier -w .
110-
```
111-
112-
[1]: https://pages.github.com/
113-
[2]: https://github.com/aep-dev/site-generator
114-
[3]: https://docker.com/
115-
[4]: https://prettier.io/
116-
[5]: https://github.com/pyenv/pyenv
117-
[6]: https://docs.python.org/3/library/venv.html
59+
The development server currently does not support hot reloading.

Dockerfile

-23
This file was deleted.

requirements.txt

-1
This file was deleted.

scripts/build.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
export AEP_LOCATION="${PWD}"
4+
export SG_DIRECTORY="/tmp/site-generator-beta"
5+
export AEP_LINTER_LOC="${SG_DIRECTORY}/api-linter"
6+
if [ ! -d "${SG_DIRECTORY}" ]; then
7+
git clone https://github.com/aep-dev/site-generator-beta.git "${SG_DIRECTORY}"
8+
fi
9+
10+
if [ ! -d "${AEP_LINTER_LOC}" ]; then
11+
git clone https://github.com/aep-dev/api-linter.git "${AEP_LINTER_LOC}"
12+
fi
13+
cd "${SG_DIRECTORY}" || exit
14+
# make rules / website folder
15+
mkdir -p src/content/docs/tooling/linter/rules
16+
mkdir -p src/content/docs/tooling/website
17+
npm install
18+
npm run generate

scripts/serve.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
. ./scripts/build.sh
4+
npm run preview

serve.sh

-38
This file was deleted.

0 commit comments

Comments
 (0)