mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-08 08:20:29 +00:00
Publish docs via an artifact instead
We'll deploy this via a webhook instead.
This commit is contained in:
parent
9fbb1070ef
commit
af21792844
19
.github/workflows/make-doc.sh
vendored
19
.github/workflows/make-doc.sh
vendored
@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
DEST="${GITHUB_REF#refs/*/}"
|
||||
echo "Uploading docs to https://tweaked.cc/$DEST"
|
||||
|
||||
# Setup ssh key
|
||||
mkdir -p "$HOME/.ssh/"
|
||||
echo "$SSH_KEY" > "$HOME/.ssh/key"
|
||||
chmod 600 "$HOME/.ssh/key"
|
||||
|
||||
# And upload
|
||||
rsync -avc -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" \
|
||||
"$GITHUB_WORKSPACE/projects/web/build/site/" \
|
||||
"$SSH_USER@$SSH_HOST:/$DEST"
|
||||
rsync -avc -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" \
|
||||
"$GITHUB_WORKSPACE/projects/common-api/build/docs/javadoc/" \
|
||||
"$SSH_USER@$SSH_HOST:/$DEST/javadoc"
|
25
.github/workflows/make-doc.yml
vendored
25
.github/workflows/make-doc.yml
vendored
@ -11,30 +11,25 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
- name: 📥 Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
- name: 📥 Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Setup Gradle
|
||||
- name: 📥 Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/mc-') }}
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew compileJava --no-daemon || ./gradlew compileJava --no-daemon
|
||||
- name: ⚒️ Generate documentation
|
||||
run: ./gradlew docWebsite --no-daemon
|
||||
|
||||
- name: Generate documentation
|
||||
run: ./gradlew docWebsite :common-api:javadoc --no-daemon
|
||||
|
||||
- name: Upload documentation
|
||||
run: .github/workflows/make-doc.sh 2> /dev/null
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.SSH_KEY }}
|
||||
SSH_USER: ${{ secrets.SSH_USER }}
|
||||
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||
SSH_PORT: ${{ secrets.SSH_PORT }}
|
||||
- name: 📤 Upload Jar
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Documentation
|
||||
path: ./projects/web/build/site/
|
||||
|
@ -145,6 +145,8 @@ val docWebsite by tasks.registering(Copy::class) {
|
||||
from(illuaminateDocs) { exclude("**/*.html") }
|
||||
// And item/block images from the data export
|
||||
from(file("src/htmlTransform/export/items")) { into("images/items") }
|
||||
// Add the common-api (and core-api) javadoc
|
||||
from(project(":common-api").tasks.named("javadoc")) { into("javadoc") }
|
||||
|
||||
into(layout.buildDirectory.dir("site"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user