-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (41 loc) · 1.63 KB
/
cka_notes_generation.yaml
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
--- # generate documentation for the cka notes
name: ckanotes-generator
on:
push:
branches:
- master
tags:
- ckanotes-generator-*
paths:
- 'docs/**'
jobs:
deploy-cka-notes-generator:
runs-on: ubuntu-latest
steps:
- name: Checkout public repo
uses: actions/checkout@master
- name: Init and plan and apply terraform to create remote state in s3 and locking in dynamodb
run: terraform init -input=false -var-file=bharath.tfvars && terraform plan -input=false -var-file=bharath.tfvars && terraform apply -input=false -var-file=bharath.tfvars -auto-approve
working-directory: ./terraform/app
env:
TF_IN_AUTOMATION: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Run playbook to install python sphnix
run: |
ansible-playbook playbook.yml -vv --tags="docsgen"
working-directory: docs
- name: compile docs to HTML
run: make html
working-directory: docs
- name: Zip up compiled html docs
run: tar -czf ../../../../docs/ckanotesdocs.tar.gz .
working-directory: docs/ckanotes/_build/html
- name: Upload html docs to s3
run: aws s3 sync . s3://bharathkumarraajusckanotebook --region ap-southeast-1
working-directory: docs/ckanotes/_build/html
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}