diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b65b1b21..7c1c83ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -313,3 +313,32 @@ jobs: cache-key: flatpak-builder-${{ github.sha }} arch: ${{ matrix.variant.arch }} verbose: true + + deploy: + name: "Deploy" + runs-on: ubuntu-latest + needs: [build, flatpak] + if: github.ref == 'refs/heads/main' + + steps: + - name: Download artifacts + uses: actions/download-artifact@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Set up SSH key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_rsa + printf "Host ryne.moe\nPort 38901\nStrictHostKeyChecking no" >> ~/.ssh/config + chmod 700 ~/.ssh + chmod 600 ~/.ssh/id_rsa + chmod 644 ~/.ssh/config + - name: Upload artifacts + run: | + pushd novus-windows-x86_64 + zip -r ../ novus-windows-x86_64 * + popd + + rsync --recursive "novus-windows-x86_64" deploy@ryne.moe:/srv/http/astra-distrib/novus/ + rsync --recursive "novus-x86_64.flatpak" deploy@ryne.moe:/srv/http/astra-distrib/novus/ + rsync --recursive "novus-aarch64.flatpak" deploy@ryne.moe:/srv/http/astra-distrib/novus/