Skip to content

Commit

Permalink
chore(infra): revert to dynamic usage of Docusaurus (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
plisovyi authored Nov 8, 2023
1 parent 546ce9f commit 1a925b6
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 6,695 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ jobs:
- run: yarn config set network-timeout 300000
- run: yarn
- run: yarn build
- run: yarn workspace engine-guides build
- run: yarn docs build
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./_docs
destination: ./_site
- run: sudo mkdir -p ./_site/guides && sudo mv ./guides/build/* ./_site/guides
- name: Create guides' package.json
# using `sudo` to avoid permissions errors
run: sudo mv ./.package.json ./package.json
working-directory: ./guides
- name: Install guides' dependencies
run: yarn && yarn build
working-directory: ./guides
- name: Move guides' output to Jekyll's `_site` in subdirectory
# using `sudo` to avoid permissions errors
run: sudo mkdir -p ./_site/guides && sudo mv ./guides/build/* ./_site/guides
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

Expand Down
5 changes: 5 additions & 0 deletions guides/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ build

# Generated files
.docusaurus

# this is a dynamic usage of Docusaurus, so dependencies are not under version control, see README.md
package.json
yarn.lock
node_modules/
1 change: 0 additions & 1 deletion guides/package.json → guides/.package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "engine-guides",
"version": "41.0.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down
4 changes: 4 additions & 0 deletions guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This website is built using [Docusaurus 3](https://docusaurus.io/), a modern sta

## Local Development

Because of issues with quality of Docusaurus dependency management, we use it dynamically, so in GitHub action
for publishing and without committing `package.json` into repository. You should rename `.package.json` to `package.json`
before starting local development.

```
yarn workspace engine-guides start
```
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"examples/*",
"packages/*",
"test-fixtures/*",
"test-fixtures/workspace/packages/*",
"guides"
"test-fixtures/workspace/packages/*"
],
"scripts": {
"clean": "rimraf -g \"./packages/*/dist\" \"./examples/*/dist\" \"./test-fixtures/*/dist\" \"./test-fixtures/workspace/packages/*/dist\"",
Expand Down
Loading

0 comments on commit 1a925b6

Please sign in to comment.