name: Snapshot

on:
  push:
    branches:
      - develop

jobs:
  dist:
    # if: github.repository == 'dita/dita'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build with Gradle
        run: ./gradlew
      - name: Snapshot distribution package deployment
        run: ./gradlew dist -Pcommit=${GITHUB_SHA} -PskipGenerateDocs=true --no-daemon
      - name: Upload to S3
        uses: jakejarvis/s3-sync-action@master
        with:
          args: --acl public-read --follow-symlinks
        env:
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'eu-west-1'
          SOURCE_DIR: 'build/distributions'

name: Snapshot

on:
  push:
    branches:
      - develop

jobs:
  dist:
    if: github.repository == 'dita-ot/dita-ot'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Build with Gradle
        run: ./gradlew
      - name: Snapshot distribution package deployment
        run: ./gradlew dist -Pcommit=${GITHUB_SHA} -PskipGenerateDocs=true --no-daemon
      - name: Upload to S3
        uses: jakejarvis/s3-sync-action@master
        with:
          args: --acl public-read --follow-symlinks
        env:
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'eu-west-1'
          SOURCE_DIR: 'build/distributions'

Fix org/repo name in condition
Fix org/repo name in condition

Signed-off-by: Jarno Elovirta <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@elovirta.com>
