Skip to content

Commit

Permalink
CI: added deploy, fix for variables
Browse files Browse the repository at this point in the history
  • Loading branch information
reinder authored Feb 19, 2023
1 parent 7d6737e commit 59a35e8
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: sparkfabrik/android-build-action@v1.3.4
with:
project-path: .
output-path: traintastic-${{env.CI_REF_NAME_SLUG}}-${{env.GITHUB_RUN_NUMBER}}-${{env.CI_SHA_SHORT}}.apk
output-path: traintastic-${{github.ref_name}}-${{github.run_number}}-${{env.CI_SHA_SHORT}}.apk
ruby-version: "2.7.5"
bundler-version: "2.3.26"

Expand All @@ -25,3 +25,29 @@ jobs:
with:
name: traintastic-apk
path: ${{github.workspace}}/*.apk

deploy:
name: Deploy to website
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
needs: [build-apk]

steps:
- uses: FranzDiebold/github-env-vars-action@v2

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: traintastic-apk
path: ${{github.workspace}}/dist/${{env.CI_REF_NAME_SLUG}}/${{github.run_number}}

- uses: easingthemes/ssh-deploy@v2.2.11
env:
SSH_PRIVATE_KEY: ${{secrets.SERVER_SSH_KEY}}
ARGS: "-rltgoDzvO"
SOURCE: "dist/*"
REMOTE_HOST: ${{secrets.REMOTE_HOST}}
REMOTE_PORT: ${{secrets.REMOTE_PORT}}
REMOTE_USER: ${{secrets.REMOTE_USER}}
TARGET: ${{secrets.REMOTE_TARGET}}/traintastic-android/

0 comments on commit 59a35e8

Please sign in to comment.