-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.51 KB
/
pipeline.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
62
63
64
name: main pipeline
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1
- name: Prepare Hugo
run: git submodule update --init --recursive
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Build Crypto Diagrams
shell: bash
run: |
pushd './content/notes/crypto'
python -m pip install --upgrade pip
pip install -r ./dev-requirements.txt
inv d
popd
- name: Setup Node
uses: actions/setup-node@v2
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Copy Files to Site bucket
run: aws s3 sync ./public s3://ballz-website
- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id EQ8NJ8VEOX653 --paths "/*"