Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cygniv404 authored Oct 5, 2024
1 parent 29a51ed commit 8c3d8b0
Showing 1 changed file with 39 additions and 36 deletions.
75 changes: 39 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,47 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Generate Javadoc
run: mvn javadoc:javadoc

- name: Upload Javadoc as an artifact
uses: actions/upload-artifact@v3
with:
name: javadoc
path: ./target/site/apidocs/ # Upload the generated site directory
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'microsoft'

- name: Build with Maven
run: mvn -B package --file pox.xml

- name: Generate Javadoc
run: mvn -f pox.xml javadoc:javadoc
- name: Upload Javadoc as an artifact
uses: actions/upload-artifact@v3
with:
name: javadoc
path: ./target/site/apidocs # Upload the generated site directory


- name: Run tests
run: mvn -f pox.xml test

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Download Javadoc artifact
uses: actions/download-artifact@v3
with:
name: javadoc # Download the previously uploaded artifact

- name: List downloaded files for verification
run: ls -R ./target/site/

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site/apidocs # Deploy the downloaded static files
- name: Checkout code
uses: actions/checkout@v2
- name: Download Javadoc artifact
uses: actions/download-artifact@v3
with:
name: javadoc # Download the previously uploaded artifact
- name: tests
run: ls -R ./target/site
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./target/site/apidocs # Assuming you are deploying static content from the site directory

0 comments on commit 8c3d8b0

Please sign in to comment.