-
Notifications
You must be signed in to change notification settings - Fork 68
61 lines (56 loc) · 1.61 KB
/
CI.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: iterate-ch/[email protected]
with:
docs-folder: "."
build-command: "make dirhtml"
- name: Cache artifacts
uses: actions/cache@v4
if: github.ref == 'refs/heads/main'
with:
key: html-${{ github.sha }}
path: ./_build/dirhtml
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Cache artifacts
uses: actions/cache@v4
with:
key: html-${{ github.sha }}
path: ./_build/dirhtml
- name: Deploy
uses: iterate-ch/cyberduck-cli-action@v1
id: upload
env:
USERNAME: '${{ secrets.AWS_ACCESS_KEY_ID }}'
PASSWORD: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
with:
mode: upload
url: 's3:/github-cyberduck-docs/'
path: './_build/dirhtml/*'
args: '--existing compare --region ${{ secrets.AWS_DEFAULT_REGION }}'
- name: Purge CDN
uses: iterate-ch/cyberduck-cli-action@v1
id: purge
env:
USERNAME: '${{ secrets.AWS_ACCESS_KEY_ID }}'
PASSWORD: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
with:
mode: purge
url: 's3:/github-cyberduck-docs/'
args: '--region ${{ secrets.AWS_DEFAULT_REGION }}'