Files
SwiftLint/script/push-docs
JP Simard d2643db495 [Docs] Build docs using jazzy (#3016)
* Add `.jazzy.yaml` configuration file
* Update `swiftlint generate-docs` to write docs to a directory rather than a single file
* Add jazzy to the Gemfile
* Run `bundle update`
* Add CI job to run jazzy automatically and publish to GitHub Pages

![swiftlint-jazzy](https://user-images.githubusercontent.com/474794/71799038-fcf4e180-3008-11ea-81fa-3eb9cf296506.gif)
2020-01-07 20:31:29 -08:00

26 lines
581 B
Bash
Executable File

#!/bin/bash
mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
source_sha="$(git rev-parse HEAD)"
user="swiftlintbot@jpsim.com"
git config --global user.email "$user"
git config --global user.name "$user"
git clone git@github.com:realm/SwiftLint.git out
cd out
git checkout gh-pages
git rm -rf .
rm -rf Carthage
cd ..
cp -a docs/. out/.
cd out
git add -A
git commit -m "Automated deployment to GitHub Pages: ${source_sha}" --allow-empty
git push origin gh-pages