Skip to content

Commit

Permalink
Build site without the deploy folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Bellangelo committed Jun 4, 2024
1 parent 38e249c commit e7a5999
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/respec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
- name: Install dependencies
run: npm ci

- uses: actions/checkout@v4
with:
ref: main
path: docs/deploy

- name: run main script
run: scripts/md2html/build.sh

Expand All @@ -49,7 +44,7 @@ jobs:
branch: update-respec-version
base: main
delete-branch: true
path: docs/deploy
path: docs
labels: Housekeeping
reviewers: TSC
title: Update ReSpec versions
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
target
atlassian-ide-plugin.xml
node_modules/
deploy/
history
Gemfile.lock
1 change: 0 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
_site/
deploy/
11 changes: 4 additions & 7 deletions scripts/md2html/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
# run this script from the root of the repo. It is designed to be run by a GitHub workflow.
# It contains bashisms

mkdir -p deploy/oas
mkdir -p deploy/js

cd scripts/md2html
mkdir -p history
cat > history/MAINTAINERS_v2.0.md <<EOF
Expand All @@ -33,18 +30,18 @@ cp history/MAINTAINERS_v3.0.2.md history/MAINTAINERS_v3.0.3.md
cp history/MAINTAINERS_v3.0.2.md history/MAINTAINERS_v3.1.0.md
# add lines for 3.0.4, 3.1.1, ...

cp -p js/* ../../deploy/js 2> /dev/null
cp -p markdown/* ../../deploy/ 2> /dev/null
cp -p js/* ../../docs/js 2> /dev/null
cp -p markdown/* ../../docs/ 2> /dev/null

latest=`git describe --abbrev=0 --tags`
latestCopied=none
for filename in ../../versions/[23456789].*.md ; do
version=$(basename "$filename" .md)
node md2html.js --respec --maintainers ./history/MAINTAINERS_v$version.md ${filename} > ../../deploy/oas/v$version.html
node md2html.js --respec --maintainers ./history/MAINTAINERS_v$version.md ${filename} > ../../docs/oas/v$version.html
if [ $version = $latest ]; then
if [[ ${version} != *"rc"* ]];then
# version is not a Release Candidate
cp -p ../../deploy/oas/v$version.html ../../deploy/oas/latest.html
cp -p ../../docs/oas/v$version.html ../../docs/oas/latest.html
latestCopied=v$version
fi
fi
Expand Down

0 comments on commit e7a5999

Please sign in to comment.