Deploy: Merge pull request #10 from badgeteam/troopers23/dev TROOPERS23 firmware dev release 1.1.1 #53
This file contains 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: Autodeploy | |
run-name: "Deploy: ${{ github.event.head_commit.message }}" | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- '.github/**' | |
- '!.github/workflows/cd.yml' # this workflow | |
- README.md | |
jobs: | |
upload: | |
name: Deploy to server | |
environment: 'Badge.team OTA' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Check firmware+metadata consistency | |
run: ./check_versions.sh | |
# Fix timestamps for differential update | |
- name: Restore file timestamps | |
uses: chetan/git-restore-mtime-action@v2 | |
- name: Generate new index.html | |
run: ./make_index.sh | |
- name: Upload with Rsync | |
uses: SamKirkland/web-deploy@v1 | |
with: | |
source-path: '.' | |
target-server: ${{ vars.HOST }} | |
ssh-port: ${{ vars.SSH_PORT }} | |
remote-user: ${{ vars.SSH_USER }} | |
private-ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
destination-path: ${{ vars.WEBROOT }} | |
rsync-options: > | |
--archive --verbose --compress | |
--human-readable --progress | |
--delete-after | |
--exclude=.git* --exclude=.git/ --exclude=.gitignore | |
--exclude=README.md --exclude=readme.md | |
--exclude=*.sh --exclude=*.bak |