-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (40 loc) · 1.31 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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