Merge pull request #6 from Kolleg-St-Thomas/develop #33
This file contains hidden or 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
| name: Upload maps to server | |
| on: [push] | |
| jobs: | |
| upload-maps: | |
| name: Upload maps to server | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
| - name: Deploy with branch name | |
| run: rsync -avh ./map/ "maps@${{ secrets.SSH_HOST }}:/mnt/maps/${GITHUB_REF##*/}" --delete | |
| - name: Deploy with commit id | |
| run: rsync -avh ./map/ "maps@${{ secrets.SSH_HOST }}:/mnt/maps/$(git rev-parse --short HEAD)" --delete |