init research
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
name: Archive Example Projects
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'examples/android-example/**'
|
||||
- 'examples/kotlin-dataframe-plugin-gradle-example/**'
|
||||
- 'examples/kotlin-dataframe-plugin-maven-example/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-archives:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create archives in temp directory
|
||||
run: |
|
||||
mkdir -p /tmp/archives
|
||||
|
||||
cd examples/android-example
|
||||
zip -r /tmp/archives/android-example.zip . -x "*.git*" "build/*" ".gradle/*" "*/build/*"
|
||||
|
||||
cd ../kotlin-dataframe-plugin-gradle-example
|
||||
zip -r /tmp/archives/kotlin-dataframe-plugin-gradle-example.zip . -x "*.git*" "build/*" ".gradle/*" "*/build/*" ".idea/*"
|
||||
|
||||
cd ../kotlin-dataframe-plugin-maven-example
|
||||
zip -r /tmp/archives/kotlin-dataframe-plugin-maven-example.zip . -x "*.git*" "target/*" ".idea/*"
|
||||
|
||||
- name: Checkout example-projects-archives branch
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
if git ls-remote --exit-code --heads origin example-projects-archives; then
|
||||
git fetch origin example-projects-archives
|
||||
git checkout example-projects-archives
|
||||
else
|
||||
git checkout --orphan example-projects-archives
|
||||
git rm -rf .
|
||||
fi
|
||||
|
||||
- name: Update archives
|
||||
run: |
|
||||
git rm -f *.zip 2>/dev/null || true
|
||||
|
||||
cp /tmp/archives/*.zip .
|
||||
|
||||
CURRENT_DATE=$(date -u '+%Y-%m-%d %H:%M UTC')
|
||||
|
||||
cat > README.md << EOF
|
||||
# Kotlin DataFrame - Example Projects Archives
|
||||
|
||||
Automatically generated archives of example projects.
|
||||
|
||||
## Available archives:
|
||||
|
||||
### Android Example
|
||||
Example of using Kotlin DataFrame in an Android application.
|
||||
|
||||
**Download:** [android-example.zip](https://github.com/Kotlin/dataframe/raw/example-projects-archives/android-example.zip)
|
||||
|
||||
### Kotlin DataFrame Plugin Gradle Example
|
||||
Example of using the compiler plugin for Kotlin DataFrame in Gradle project.
|
||||
|
||||
**Download:** [kotlin-dataframe-plugin-gradle-example.zip](https://github.com/Kotlin/dataframe/raw/example-projects-archives/kotlin-dataframe-plugin-gradle-example.zip)
|
||||
|
||||
### Kotlin DataFrame Plugin Maven Example
|
||||
Example of using the compiler plugin for Kotlin DataFrame in Gradle project.
|
||||
|
||||
**Download:** [kotlin-dataframe-plugin-maven-example.zip](https://github.com/Kotlin/dataframe/raw/example-projects-archives/kotlin-dataframe-plugin-maven-example.zip)
|
||||
|
||||
---
|
||||
|
||||
Last updated: $CURRENT_DATE
|
||||
|
||||
Source commit: ${{ github.sha }}
|
||||
EOF
|
||||
|
||||
git add .
|
||||
git commit -m "Update example archives from ${{ github.sha }}" || echo "No changes to commit"
|
||||
|
||||
- name: Push to example-projects-archives branch
|
||||
run: |
|
||||
git push -f origin example-projects-archives
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Auto-commit generated code
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Run Gradle task
|
||||
timeout-minutes: 60
|
||||
run: ./gradlew processKDocsMain korro
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
git add './core/generated-sources' './dataframe-csv/generated-sources' './docs/StardustDocs/resources/snippets' './docs/StardustDocs/topics'
|
||||
git diff --staged --quiet || git commit -m "Automated commit of generated code"
|
||||
git push
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,73 @@
|
||||
name: Preview Generated Code
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
statuses: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- edited
|
||||
- opened
|
||||
- synchronize
|
||||
- converted_to_draft
|
||||
- ready_for_review
|
||||
|
||||
jobs:
|
||||
build_preview_generated_code:
|
||||
name: Build Preview of Generated Code
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
|
||||
- name: Configure Git User
|
||||
run: |
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
|
||||
- name: Run Gradle task
|
||||
timeout-minutes: 60
|
||||
run: ./gradlew processKDocsMain korro
|
||||
|
||||
- name: Check for changes in generated sources
|
||||
id: git-diff
|
||||
run: echo "changed=$(if git diff --quiet './core/generated-sources' './dataframe-csv/generated-sources' './docs/StardustDocs/resources/snippets' './docs/StardustDocs/topics'; then echo 'false'; else echo 'true'; fi)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit and push if changes
|
||||
id: git-commit
|
||||
if: steps.git-diff.outputs.changed == 'true'
|
||||
run: |
|
||||
git checkout -b generated-sources/docs-update-${{ github.run_number }}
|
||||
git add './core/generated-sources' './dataframe-csv/generated-sources' './docs/StardustDocs/resources/snippets' './docs/StardustDocs/topics'
|
||||
git commit -m "Update generated sources with recent changes"
|
||||
git push origin generated-sources/docs-update-${{ github.run_number }}
|
||||
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update status to PR
|
||||
uses: actions/github-script@v7
|
||||
if: steps.git-diff.outputs.changed == 'true'
|
||||
with:
|
||||
# language=js
|
||||
script: |
|
||||
await github.rest.repos.createCommitStatus({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
sha: context.payload.pull_request.head.sha,
|
||||
state: "success",
|
||||
target_url: "https://github.com/${{ github.repository }}/commit/${{ steps.git-commit.outputs.commit }}",
|
||||
context: "Generated sources will change, merging this PR",
|
||||
description: "Check 'Details' to inspect changes ->"
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
name: "Validate Gradle Wrapper"
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Validation"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/actions/wrapper-validation@v4
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
name: Junie
|
||||
run-name: Junie run ${{ inputs.run_id }}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
run_id:
|
||||
description: "id of workflow process"
|
||||
required: true
|
||||
workflow_params:
|
||||
description: "stringified params"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
call-workflow-passing-data:
|
||||
uses: jetbrains-junie/junie-workflows/.github/workflows/ej-issue.yml@main
|
||||
with:
|
||||
workflow_params: ${{ inputs.workflow_params }}
|
||||
Vendored
+108
@@ -0,0 +1,108 @@
|
||||
name: Build docs
|
||||
|
||||
on:
|
||||
# Specify to run a workflow manually from the Actions tab on GitHub.
|
||||
workflow_dispatch:
|
||||
|
||||
# Gives the workflow permissions to clone the repo and create a page deployment
|
||||
permissions:
|
||||
id-token: write
|
||||
pages: write
|
||||
|
||||
env:
|
||||
PRODUCT: StardustDocs/d
|
||||
ARTIFACT: webHelpD2-all.zip
|
||||
ALGOLIA_ARTIFACT: algolia-indexes-D.zip
|
||||
ALGOLIA_APP_NAME: JWPLKSKZVF
|
||||
ALGOLIA_INDEX_NAME: prod_DATAFRAME_HELP
|
||||
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
|
||||
CONFIG_JSON_PRODUCT: Dataframe
|
||||
CONFIG_JSON_VERSION: '1.0'
|
||||
|
||||
jobs:
|
||||
build-job:
|
||||
runs-on: ubuntu-latest
|
||||
container: registry.jetbrains.team/p/writerside/builder/writerside-builder:2025.04.8412
|
||||
outputs:
|
||||
artifact: ${{ steps.generate-artifact.outputs.artifact }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Prepare for build
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y zip
|
||||
mkdir -p artifacts
|
||||
- name: Build docs # and include sitemap.xml TODO: uncomment when sitemap.xml is available
|
||||
run: |
|
||||
export DISPLAY=:99
|
||||
Xvfb :99 &
|
||||
/opt/builder/bin/idea.sh helpbuilderinspect -source-dir . -product $PRODUCT --runner github -output-dir artifacts/ || true
|
||||
test -e artifacts/$ARTIFACT && echo $ARTIFACT exists
|
||||
# cp docs/StardustDocs/sitemap.xml artifacts/sitemap.xml
|
||||
# cd artifacts
|
||||
# zip -r $ARTIFACT sitemap.xml
|
||||
working-directory: ${{ github.workspace }}
|
||||
- name: Upload modified documentation artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: help
|
||||
path: artifacts/${{ env.ARTIFACT }}
|
||||
retention-days: 7
|
||||
- name: Upload algolia-indexes
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: algolia-indexes
|
||||
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
|
||||
retention-days: 7
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
# Requires the build-job results
|
||||
needs: build-job
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: help
|
||||
- name: Unzip artifact
|
||||
uses: montudor/action-zip@v1
|
||||
with:
|
||||
args: unzip -qq ${{ env.ARTIFACT }} -d dir
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: dir
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
publish-indexes:
|
||||
# Requires the build-job results
|
||||
needs: build-job
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
|
||||
|
||||
steps: # Using v3 for compatibility with algolia-indexes
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: algolia-indexes
|
||||
- uses: montudor/action-zip@v1
|
||||
with:
|
||||
args: unzip -qq algolia-indexes-D.zip -d algolia-indexes
|
||||
- run: |
|
||||
env "algolia-key=${{env.ALGOLIA_KEY}}" java -jar /opt/builder/help-publication-agent.jar \
|
||||
update-index \
|
||||
--application-name ${{env.ALGOLIA_APP_NAME}} \
|
||||
--index-name ${{env.ALGOLIA_INDEX_NAME}} \
|
||||
--product ${{env.CONFIG_JSON_PRODUCT}} \
|
||||
--version ${{env.CONFIG_JSON_VERSION}} \
|
||||
--index-directory algolia-indexes/ \
|
||||
2>&1 | tee algolia-update-index-log.txt
|
||||
Reference in New Issue
Block a user