-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d7ef0a
commit f793562
Showing
4 changed files
with
115 additions
and
132 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Prepare the Static Site | ||
run: ./scripts/github-pages.sh | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# Upload the generated pages | ||
path: './build/static' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
|
||
test-ubuntu: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 25 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
check-latest: true | ||
|
||
- name: Gradle Wrapper Validation | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Test on Ubuntu | ||
run: ./gradlew assemble check --no-build-cache --no-daemon --stacktrace | ||
|
||
all-checks: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test-ubuntu | ||
|
||
steps: | ||
- name: require that all other jobs have passed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
allowed-skips: publish | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
publish-snapshot: | ||
needs: [ all-checks ] | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'square/invert' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | ||
timeout-minutes: 25 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
check-latest: true | ||
|
||
- name: Gradle Wrapper Validation | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Publish Snapshot | ||
run: ./gradlew :invert-models:publish :invert-plugin:publish :invert-report-common:publish --no-configuration-cache --stacktrace | ||
env: | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.