-
Notifications
You must be signed in to change notification settings - Fork 221
57 lines (46 loc) · 1.74 KB
/
release_6_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
56
57
name: Release > Tiny 6 Docs
on:
workflow_dispatch:
push:
paths:
- '**'
branches:
- 'release/docs-6'
jobs:
build:
name: Build Docs and Deploy
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [21]
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v2
with:
cache: 'yarn'
node-version: ${{ matrix.node-version }}
- name: (Release - Docs 6) Install dependencies
run: yarn install
- name: (Release - Docs 6) Build API References
run: yarn build
- name: (Release - Docs 6) Build Website
run: yarn antora ./antora-playbook-prod.yml
- name: (deploy) Upload site to S3
run: aws s3 sync --acl=public-read --delete ./build/site s3://tiny-cloud-antora-docs-production/docs --exclude '*' --include 'tinymce/6/*'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: (deploy) Upload images to S3
run: aws s3 sync --acl=public-read ./build/site/_ s3://tiny-cloud-antora-docs-production/docs/_ --exclude '*' --include 'img'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: (deploy) Invalidate Cache
run: aws cloudfront create-invalidation --distribution-id E3LFU502SQ5UR --paths "/docs/*"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true