name: cucumber-eclipse plugin (latest)

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3
      with:
        path: code
    - name: Checkout pages
      uses: actions/checkout@v3
      with:
        path: gh-pages
        ref: gh-pages
      if: github.event_name != 'pull_request'
    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'adopt'
        architecture: 'x64'
    - name: Cache local Maven repository
      uses: actions/cache@v3
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
         ${{ runner.os }}-maven-
    - name: Build with Maven
      working-directory: code
      run: mvn -B package --file pom.xml
    - name: deploy
      working-directory: gh-pages
      run: |
        mkdir -p update-site/${GITHUB_REF##*/}/
        cp -R ../code/io.cucumber.eclipse.updatesite/target/repository/* update-site/${GITHUB_REF##*/}/
        git add .
        git config user.name github-actions
        git config user.email github-actions@github.com
        git commit -m "Add latest update-site for version ${GITHUB_REF##*/}"
        git push gh-pages --force
      if: github.event_name != 'pull_request'


name: cucumber-eclipse plugin (latest)

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3
      with:
        path: code
    - name: Checkout pages
      uses: actions/checkout@v3
      with:
        path: gh-pages
        ref: gh-pages
      if: github.event_name != 'pull_request'
    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'adopt'
        architecture: 'x64'
    - name: Cache local Maven repository
      uses: actions/cache@v3
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
         ${{ runner.os }}-maven-
    - name: Build with Maven
      working-directory: code
      run: mvn -B package --file pom.xml
    - name: deploy
      working-directory: gh-pages
      run: |
        mkdir -p update-site/${GITHUB_REF##*/}/
        cp -R ../code/io.cucumber.eclipse.updatesite/target/repository/* update-site/${GITHUB_REF##*/}/
        git add .
        git config user.name github-actions
        git config user.email github-actions@github.com
        git commit -m "Add latest update-site for version ${GITHUB_REF##*/}"
        git push origin gh-pages --force
      if: github.event_name != 'pull_request'


Fix my fix to the gh-pages build step
Fix my fix to the gh-pages build step