-
-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12690ac
commit 736e680
Showing
5 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
echo "About to publish $GITHUB_REF to gh-pages..." | ||
|
||
rm -rf ../gh-pages | ||
|
||
git config --global user.name "$GIT_USER_NAME" | ||
git config --global user.email "$GIT_USER_EMAIL" | ||
git clone -b gh-pages --single-branch https://${GH_TOKEN_PUBLIC}@github.com/ajv-validator/ajv.git ../gh-pages | ||
SOURCE=../gh-pages/_source | ||
mkdir -p $SOURCE | ||
cp *.md $SOURCE | ||
cp -R docs $SOURCE | ||
cp LICENSE $SOURCE | ||
cd ../gh-pages | ||
node ./generate | ||
|
||
# remove logo from README | ||
sed -E "s/<img[^>]+ajv_logo[^>]+>//" index.md > new-index.md | ||
mv new-index.md index.md | ||
|
||
if [[ `git status --porcelain` ]]; then | ||
echo "Changes detected. Updating gh-pages branch..." | ||
git commit -am "updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID" | ||
git push --quiet origin gh-pages > /dev/null 2>&1 | ||
fi | ||
|
||
echo "Done" |
This file was deleted.
Oops, something went wrong.