Skip to content

Commit

Permalink
πŸ€– CI: Switch javadocs to upload to S3
Browse files Browse the repository at this point in the history
πŸ› FIX: Correct AWS secret key names for javadocs upload

πŸ› FIX: Correct javadocs path for picking up new apidocs for upload

πŸ€– CI: Drop GH token for main build

πŸ€– CI: Add versioning to javadocs artifact upload
  • Loading branch information
michaelborn authored and Michael Born committed Mar 1, 2023
1 parent 7cd4705 commit 0d5f777
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
token: ${{secrets.GH_TOKEN}}

- name: Set up JDK 11
uses: actions/setup-java@v3
Expand Down Expand Up @@ -97,8 +95,6 @@ jobs:
if: "!contains(github.event.head_commit.message, '__CI__')"
steps:
- uses: actions/checkout@v3
with:
token: ${{secrets.GH_TOKEN}}

- name: Set up JDK 8
uses: actions/setup-java@v3
Expand All @@ -115,13 +111,23 @@ jobs:
- name: Generate Javadocs
run: mvn --batch-mode -f pom.xml javadoc:javadoc

## TODO: Publish apidocs to S3
- name: Get Project Version for Javadocs Versioning
id: current_version
# For Maven builds (future)
# run: echo "VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`" >> $GITHUB_ENV
# For Ant builds (still the default)
run: echo "VERSION=`ant -silent -quiet version`" >> $GITHUB_ENV

# - name: Commit Javadocs
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# file_pattern: "docs"
# commit_message: "πŸ“˜ DOC: Rebuild API Javadocs __CI__"
- name: Upload API Docs to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: ${{ secrets.AWS_APIDOCS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
SOURCE_DIR: "docs"
DEST_DIR: "lucee/hibernate-extension/${{ env.VERSION }}/"

format:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<mkdir dir="${dist}/extension/jars"/>
</target>

<!-- Output the project version for use in versioning S3 artifact uploads -->
<target name="version">
<echo>${bundleversion}${build.number}${versionAppendix}</echo>
</target>

<target name="copy" depends="init" description="copy source file to temp" >
<!-- copy the source -->
Expand Down

0 comments on commit 0d5f777

Please sign in to comment.