fix markdown style #20
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
name: build | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
name: Build & Deploy Docs Site | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.8.0 | |
cache: 'npm' | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build Theme | |
working-directory: ./themes/doc | |
run: | | |
npm ci | |
npx webpack --mode production | |
- name: Build HTML | |
run: | | |
npm ci | |
npx hexo generate | |
echo "www.ktorm.org" > "./public/CNAME" | |
- name: Build Dokka HTML | |
run: | | |
BASEDIR=$(pwd) | |
PROJECT_DIR=~/.ktorm-docs/temp/repo/ktorm | |
echo 'org.gradle.jvmargs="-XX:MaxMetaspaceSize=2g"' > ~/.gradle/gradle.properties | |
git clone --depth=1 --branch=master https://github.com/kotlin-orm/ktorm.git "$PROJECT_DIR" | |
cd "$PROJECT_DIR" && ./gradlew dokkaHtmlMultiModule -Ddokka.templatesDir="$BASEDIR/dokka/templates" | |
cp -r "$PROJECT_DIR/build/dokka/htmlMultiModule" "$BASEDIR/public/api-docs" | |
- name: Deploy | |
env: | |
GIT_PUSH_TOKEN: ${{secrets.GIT_PUSH_TOKEN}} | |
run: | | |
BASEDIR=$(pwd) | |
DEPLOY_DIR=~/.ktorm-docs/temp/repo/ktorm-docs | |
git clone --depth=1 --branch=gh-pages https://github.com/kotlin-orm/ktorm-docs.git "$DEPLOY_DIR" | |
cd "$DEPLOY_DIR" | |
git rm -rf . | |
cp -r "$BASEDIR/public/." "$DEPLOY_DIR" | |
if [[ `git status --porcelain` ]]; then | |
git config user.name 'vince' | |
git config user.email '[email protected]' | |
git add . | |
git commit -m "[github actions] deploy the site" | |
git push "https://[email protected]/kotlin-orm/ktorm-docs.git" gh-pages | |
fi |