-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 1.82 KB
/
docsite.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: Documentation
on:
workflow_dispatch:
push:
branches:
- 'trunk'
jobs:
docsite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nelonoel/[email protected]
- name: install hugo
run: |
sudo snap install hugo --channel=extended
- name: Install global packages
run: |
yarn install
- uses: ruby/setup-ruby@v1
- name: Cache Gems
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-medicaid_gateway-gems-mitc-service-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-medicaid_gateway-gems-mitc_service-${{ hashFiles('**/Gemfile.lock') }}
- name: bundle install
run: |
bundle config path vendor/bundle
bundle install
cd components/mitc_service
bundle config path ../../vendor/bundle
bundle install
- name: Run yard
run: bundle exec yard doc && mv ./doc ./hugo/static/doc
- name: Build Documentation
run: cd hugo && npm install && hugo --minify
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.IC_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IC_AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: hugo/public
DEST_DIR: ${{ env.BRANCH_NAME }}
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.IC_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IC_AWS_SECRET_ACCESS_KEY }}