-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (52 loc) · 1.63 KB
/
deploy_smart_layer_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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "Deploy to https://document.smartlayer.network"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build smart-layer docs
uses: dita-ot/dita-ot-action@master
with:
dita-ot-version: 4.1
plugins: |
fox.jason.extend.css
fox.jason.favicon
https://github.com/oxygenxml/dita-ot-diagrams-plugin/archive/refs/heads/master.zip
project: config/smartlayer-docsite.yaml
- name: Build smart-layer papers
uses: dita-ot/dita-ot-action@master
with:
dita-ot-version: 4.1
project: config/tokenscript-papers.xml
- uses: actions/upload-artifact@v3
with:
name: docs
path: out/
deploy:
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: docs
path: out/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: deploy
env:
S3_BUCKET: smart-layer-docs
CLOUDFRONT_ID: EMSQZ9P16DCKC
run: |
aws s3 sync out/ "s3://${S3_BUCKET}/" --cache-control 'max-age=600,s-maxage=31536000' --quiet --delete \
&& aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_ID}" --paths '/*'