Skip to content

Commit 96ae00b

Browse files
authored
Merge pull request #79 from armatronic/task-develop/SA-14762
Remove old docs completely [SA-14762]
2 parents 8d57dd7 + b62192e commit 96ae00b

File tree

8 files changed

+23
-4606
lines changed

8 files changed

+23
-4606
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/publish-design.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
paths-ignore:
1515
- docs/builds/*
1616
- docs/builds.json
17-
- docs/dist.yaml
1817
jobs:
1918
build:
2019
if: github.repository == 'alaress/schoolbox-api-docs'
@@ -33,7 +32,7 @@ jobs:
3332
git config --global user.name "github-actions[bot]"
3433
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
3534
36-
# Copy all files (excl. builds/, builds.json, dist.yaml) into gh-pages repo
35+
# Copy all files (excl. builds/, builds.json) into gh-pages repo
3736
mkdir .staging/
3837
cp -r ./* .staging/
3938
@@ -44,7 +43,6 @@ jobs:
4443
4544
# remove specs themselves
4645
rm -rf .staging/docs/builds/
47-
rm -f .staging/docs/dist.yaml
4846
rm -f .staging/docs/builds.json
4947
5048
# move files from base commit to gh-pages

.github/workflows/publish-spec-develop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# Copy docs into gh-pages repo
2626
# Also copy openapi/ and .redocly.yaml (for building docs)
2727
mkdir .staging/
28-
cp -r docs/ docs/ openapi/ .redocly.yaml .staging
28+
cp -r docs/ openapi/ .redocly.yaml .staging
2929
git checkout -- .
3030
git checkout gh-pages
3131
cp -r .staging/* .
@@ -35,9 +35,9 @@ jobs:
3535
# do not set beta specs as the most recently selected
3636
npm ci
3737
npm run rebuild-builds-list
38-
npm run build-new --build-version=${{ github.ref_name }}
38+
npm run build --build-version=${{ github.ref_name }}
3939
4040
# Commit and push
41-
git add docs/builds docs/builds.json docs/dist.yaml
41+
git add docs/builds docs/builds.json
4242
git commit --allow-empty -m "Publish spec for production release ${{ github.ref_name }}" .
4343
git push

.github/workflows/publish-spec-master.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# Copy docs into gh-pages repo
2626
# Also copy openapi/ and .redocly.yaml (for building docs)
2727
mkdir .staging/
28-
cp -r docs/ docs/ openapi/ .redocly.yaml .staging
28+
cp -r docs/ openapi/ .redocly.yaml .staging
2929
git checkout -- .
3030
git checkout gh-pages
3131
cp -r .staging/* .
@@ -34,12 +34,9 @@ jobs:
3434
# Build the docs
3535
npm ci
3636
npm run rebuild-builds-list
37-
npm run build-new --build-version=${{ github.ref_name }} --selected
38-
39-
# also do the old build (for now)
40-
npm run build
37+
npm run build --build-version=${{ github.ref_name }} --selected
4138
4239
# Commit and push
43-
git add docs/builds docs/builds.json docs/dist.yaml
40+
git add docs/builds docs/builds.json
4441
git commit --allow-empty -m "Publish spec for production release ${{ github.ref_name }}" .
4542
git push

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Dir for bundles
22
dist
3-
# Filename for bundle
4-
./dist.yaml
53
node_modules
64
.idea
75
.staging

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ steps provided below:
4444

4545
#### Building API docs locally
4646

47-
##### `npm run build`
48-
49-
Bundles the current definition to `docs/dist.yaml`.
50-
51-
(This is required for backward compatibility with the old single-version docs.)
52-
53-
##### `npm run build-new --build-version=$buildVersion [--selected]`
47+
##### `npm run build --build-version=$buildVersion [--selected]`
5448
Bundles the current definition to `docs/builds/$buildVersion.yaml`, and also
5549
creates a dropdown option for this build so that it may be selected.
5650

@@ -67,15 +61,21 @@ Validates the definition.
6761

6862
### Updating the API
6963

70-
When updating the API, do the following before creating a pull request:
71-
* run `npm run build`
72-
* commit the resultant changes to `docs/dist.yaml`
64+
Create a new release whose version number matches the Schoolbox version number
65+
you wish to create a release for.
66+
67+
Releases may be created at https://github.com/alaress/schoolbox-api-docs/releases.
68+
69+
#### Beta releases
70+
71+
- include the beta number, e.g. 22.1.0-beta3
72+
- check the pre-release checkbox
73+
74+
#### Stable releases
75+
76+
- do not include the beta number, e.g. 22.1.0
77+
- leave the pre-release checkbox unchecked
7378

74-
If building documentation for a new Schoolbox version:
75-
* run `npm run build-new` for the new version
76-
* if the new version is not a beta: provide the `--selected` flag
77-
* commit the changes to the builds list file `docs/builds.json`
78-
* commit the new YAML file in `docs/builds`
7979

8080
### Configuration
8181

docs/dist.yaml

Lines changed: 0 additions & 4573 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
},
99
"private": true,
1010
"scripts": {
11-
"build": "redocly bundle -o docs/dist.yaml && ./scripts/applyVersion.js latest docs/dist.yaml",
12-
"build-new": "redocly bundle -o docs/builds/${npm_config_build_version}.yaml && ./scripts/addBuild.js ${npm_config_build_version} ${npm_config_selected} && ./scripts/applyVersion.js ${npm_config_build_version} docs/builds/${npm_config_build_version}.yaml",
11+
"build": "redocly bundle -o docs/builds/${npm_config_build_version}.yaml && ./scripts/addBuild.js ${npm_config_build_version} ${npm_config_selected} && ./scripts/applyVersion.js ${npm_config_build_version} docs/builds/${npm_config_build_version}.yaml",
1312
"rebuild-builds-list": "./scripts/rebuildBuildsList.js",
1413
"test": "redocly lint"
1514
}

0 commit comments

Comments
 (0)