-
Notifications
You must be signed in to change notification settings - Fork 22
42 lines (40 loc) · 1.24 KB
/
docs.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
name: Documentation
env:
AWS_REGION: eu-central-1
AWS_ROLE: FirewallFactoryGithubPipelineRole
AWS_ACCOUNT: 376263449237
DISTRIBUTION_ID: E2T722RW2UKIMQ
S3_BUCKET: docs.aws-firewall-factory.com
permissions:
id-token: write
contents: read
on:
push:
branches:
- master
- 4.1.4
- bugfix
jobs:
deploy_production_main:
name: Update Documentation
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: 🔑 Configure AWS credentials
uses: aws-actions/[email protected]
env:
ACCOUNT_ID: ${{ env.AWS_ACCOUNT }}
with:
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
role-session-name: GitHubActionsSession
mask-aws-account-id: false
- name: 📦 Install dependencies
run: npm install
- name: 📄 Generate Documentation
run: npx typedoc --options typedoc.json
- name: 🚀 Upload Documentation
run: |
aws s3 sync ./docs s3://${{env.S3_BUCKET}} --delete
aws cloudfront create-invalidation --distribution-id ${{env.DISTRIBUTION_ID}} --paths "/*"