-
Notifications
You must be signed in to change notification settings - Fork 66
52 lines (47 loc) · 1.47 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
# 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@v2
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@v2
with:
key: html-${{ github.sha }}
path: ./_build/dirhtml
- name: Install Cyberduck CLI
run: |
echo -e "deb https://s3.amazonaws.com/repo.deb.cyberduck.io stable main" | sudo tee /etc/apt/sources.list.d/cyberduck.list > /dev/null
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FE7097963FEFBE72
sudo apt-get update
sudo apt-get -y install duck
- name: Deploy
run: .github/sync.sh ./_build/dirhtml
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}