Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the yaml.file #1

Closed
MathieuSoysal opened this issue Feb 4, 2022 · 0 comments · Fixed by #2
Closed

Simplify the yaml.file #1

MathieuSoysal opened this issue Feb 4, 2022 · 0 comments · Fixed by #2
Assignees
Labels
enhancement New feature or request

Comments

@MathieuSoysal
Copy link
Owner

Current problem

Currently the yaml file to publish JavaDoc is this:

name: Deploy Javadoc

on:
  push:
    branches:
      - master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: actions/setup-java@v2
        with:
          java-version: 17
          distribution: 'adopt'
      - name: Generate Javadoc
        run: mvn org.apache.maven.plugins:maven-javadoc-plugin:3.3.1:aggregate
      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@4.1.8
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: javadoc
          CLEAN: true
          FOLDER: target/site/apidocs
          TARGET_FOLDER: javadoc

It's a bit long.

Solution

It's possible to reduce the yaml file to obtain this:

name: Deploy Javadoc

on:
  push:
    branches:
      - master

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy JavaDoc 🚀
        uses: MathieuSoysal/Javadoc-publisher@2.0.0
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          javadoc-branch: javadoc
          java-version: 17

Via composite GitHub Actions

@MathieuSoysal MathieuSoysal added the enhancement New feature or request label Feb 4, 2022
@MathieuSoysal MathieuSoysal self-assigned this Feb 4, 2022
@MathieuSoysal MathieuSoysal linked a pull request Feb 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant