Skip to content

Commit

Permalink
CI: added website deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
reinder committed Sep 16, 2024
1 parent 4532bfb commit 20b8a20
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,28 @@ jobs:
with:
name: traintastic-cs-${{matrix.config.board_name}}
path: ${{steps.build.outputs.output_dir}}

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

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

- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: traintastic-cs-*
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-cs-firmware/

0 comments on commit 20b8a20

Please sign in to comment.