-
Notifications
You must be signed in to change notification settings - Fork 25
48 lines (39 loc) · 1.18 KB
/
docs-production.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
name: Deploy docs to production
on:
push:
branches:
- main
paths:
- .github/workflows/docs-production.yml
- website/**
permissions:
contents: read
deployments: write
id-token: write
env:
SLUG: background-runner
defaults:
run:
working-directory: website
jobs:
deploy:
if: false #remove this line when docs site is setup from Web team
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: production
url: https://ionic.io/docs/${{ env.SLUG }}
steps:
- uses: actions/checkout@v3
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: Build
run: pnpm run build-docs
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::319312831725:role/github-docs
aws-region: us-east-1
- name: Deploy
run: |
aws s3 sync build/ s3://ionic-docs/production/${{ env.SLUG }}/ --exclude '*.html' --cache-control max-age=31536000 --only-show-errors
aws s3 sync build/ s3://ionic-docs/production/${{ env.SLUG }}/ --exclude '*' --include '*.html' --cache-control max-age=60 --only-show-errors