diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8ac6b8c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/deploy_heroku.yml b/.github/workflows/deploy_heroku.yml new file mode 100644 index 0000000..945b5b6 --- /dev/null +++ b/.github/workflows/deploy_heroku.yml @@ -0,0 +1,39 @@ +on: + push: +jobs: + deploy: + concurrency: http4k-irc + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.7 + - name: Setup Java + uses: actions/setup-java@v4.3.0 + with: + distribution: temurin + java-version: 21 + cache: gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Cache Gradle packages + uses: actions/cache@v4.0.2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Deploy to Heroku + uses: AkhileshNS/heroku-deploy@v3.13.15 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: http4k-irc + heroku_email: ${{secrets.HEROKU_EMAIL}} + - name: Cleanup Gradle Cache + # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. + # Restoring these files from a GitHub Actions cache might cause problems for future builds. + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties +