Merge pull request #1134 from NASA-AMMOS/ci/remove-tags-trigger-gh-pages #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 19 | |
- uses: gradle/gradle-build-action@v2 | |
- name: Create Pages Build Directories | |
run: mkdir -p build/javadoc/examples | |
- name: Build EDSL API Docs | |
run: ./gradlew publishDocs | |
- name: Copy EDSL API Docs to Build Directory | |
run: | | |
cp -a ./merlin-server/constraints-dsl-compiler/build/docs ./build/constraints-edsl-api | |
cp -a ./scheduler-worker/scheduling-dsl-compiler/build/docs ./build/scheduling-edsl-api | |
- name: Build Java Docs | |
run: ./gradlew javadoc | |
- name: Copy Java Docs to Build Directory | |
run: | | |
cp -a ./constraints/build/docs/javadoc ./build/javadoc/constraints | |
cp -a ./contrib/build/docs/javadoc ./build/javadoc/contrib | |
cp -a ./examples/banananation/build/docs/javadoc ./build/javadoc/examples/banananation | |
cp -a ./examples/config-with-defaults/build/docs/javadoc ./build/javadoc/examples/config-with-defaults | |
cp -a ./examples/config-without-defaults/build/docs/javadoc ./build/javadoc/examples/config-without-defaults | |
cp -a ./examples/foo-missionmodel/build/docs/javadoc ./build/javadoc/examples/foo-missionmodel | |
cp -a ./merlin-driver/build/docs/javadoc ./build/javadoc/merlin-driver | |
cp -a ./merlin-framework/build/docs/javadoc ./build/javadoc/merlin-framework | |
cp -a ./merlin-framework-junit/build/docs/javadoc ./build/javadoc/merlin-framework-junit | |
cp -a ./merlin-framework-processor/build/docs/javadoc ./build/javadoc/merlin-framework-processor | |
cp -a ./merlin-sdk/build/docs/javadoc ./build/javadoc/merlin-sdk | |
cp -a ./merlin-server/build/docs/javadoc ./build/javadoc/merlin-server | |
cp -a ./merlin-worker/build/docs/javadoc ./build/javadoc/merlin-worker | |
cp -a ./parsing-utilities/build/docs/javadoc ./build/javadoc/parsing-utilities | |
cp -a ./scheduler-driver/build/docs/javadoc ./build/javadoc/scheduler-driver | |
cp -a ./scheduler-server/build/docs/javadoc ./build/javadoc/scheduler-server | |
cp -a ./scheduler-worker/build/docs/javadoc ./build/javadoc/scheduler-worker | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: build/ | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |