Merge pull request #131 from VariantSync/update-nixpkgs #299
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
pull_request: | |
branches: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Nix with cached packages | |
uses: rikhuijzer/[email protected] | |
with: | |
key: nix-${{ hashFiles('.github/workflows/maven.yml', 'default.nix', 'nix/**', 'pom.xml', 'local-maven-repo') }} | |
nix_file: nix/github-workflow-dependencies.nix | |
- name: Build | |
run: nix-build | |
- name: Upload Javadoc artifact | |
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: result/share/github-pages/DiffDetective | |
# An additional job is recommened in the documentation of `actions/deploy-pages` | |
deploy-javadoc: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} | |
needs: build | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
steps: | |
- name: Publish Javadoc to Github Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |