11 - uses: actions/checkout@v2
12 - name: Checkout submodules # See https://github.com/actions/checkout#Checkout-submodules
15 auth_header="$(git config --local --get http.https://github.com/.extraheader)"
16 git submodule sync --recursive
17 git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
19 uses: actions/setup-java@v1
22 - name: Cache Maven Dependencies
23 uses: actions/cache@v2.1.1
25 path: ~/.m2/repository
26 key: mograsim-maven-${{ hashFiles('**/pom.xml,**/MANIFEST.MF') }}
29 - name: Build with Maven (mocked)
31 echo mvn --batch-mode --errors --fail-at-end --show-version clean verify --file pom.xml
32 mkdir -p releng/net.mograsim.plugin.updatesite/target/repository/subdir
33 echo "file contents" > releng/net.mograsim.plugin.updatesite/target/repository/somefile.txt
34 echo "another contents" > releng/net.mograsim.plugin.updatesite/target/repository/subdir/somefile2.txt
35 - name: Deploy to mograsim.net
37 DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
38 MOGRASIM_NET_HOST_PUBKEY: ${{ secrets.MOGRASIM_NET_HOST_PUBKEY }}
41 echo "${DEPLOY_TOKEN}" > ~/.ssh/id_rsa_deploy
42 chmod 600 ~/.ssh/id_rsa_deploy
43 echo "${MOGRASIM_NET_HOST_PUBKEY}" >> ~/.ssh/known_hosts
44 scp -i ~/.ssh/id_rsa_deploy -r releng/net.mograsim.plugin.updatesite/target/repository mograsim.net:mograsim/testdeploy