Skip to content

Commit

Permalink
[GHA] Update the site distribution as out of date
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Dec 25, 2023
1 parent b5b0fd1 commit 0fe2387
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'zulu'
- uses: webfactory/ssh-agent@master
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
java-version: 21
- name: Build site
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
- name: Deploy Site to gh-pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
uses: JamesIves/github-pages-deploy-action@v4
with:
SSH: true
BRANCH: gh-pages
FOLDER: spotbugs/spotbugs-maven-plugin.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: spotbugs/spotbugs-maven-plugin.git
ssh-key: ${{ secrets.DEPLOY_KEY }}
12 changes: 12 additions & 0 deletions .mvn/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">

<servers>
<!-- Used for sonatype snapshots and releases -->
<server>
<id>ossrh</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>

<!-- Used for gh-pages-scm publish via maven-scm-publish-plugin -->
<server>
<id>gh-pages-scm</id>
Expand All @@ -32,10 +35,19 @@
<scmVersion>gh-pages</scmVersion>
</configuration>
</server>

<!-- Github deployments (site) -->
<server>
<id>github</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>

<!-- NVD API Access (dependency-check-plugin) -->
<server>
<id>nvd</id>
<password>${env.NVD_API_KEY}</password>
</server>
</servers>

</settings>

0 comments on commit 0fe2387

Please sign in to comment.