Skip to content

Commit 5ad25d9

Browse files
authored
publish yard docs to s3 (#542)
* initial commit to enable push to s3 * bumping actions version * trying with the current secrets * enable workflow dispatch and publish only on trunk push
1 parent 15e5020 commit 5ad25d9

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/docsite.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Documentation
2-
on: push
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'trunk'
37

48
jobs:
59
docsite:
@@ -13,7 +17,7 @@ jobs:
1317
with:
1418
ruby-version: 2.7.6
1519
- name: Cache Gems
16-
uses: actions/cache@v1
20+
uses: actions/cache@v4
1721
with:
1822
path: vendor/bundle
1923
key: ${{ runner.os }}-2.7.6-aca_entities-gems-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/Gemfile' ) }}
@@ -29,11 +33,11 @@ jobs:
2933
- name: Generate Documentation
3034
run: |
3135
bundle exec rake docsite
32-
- name: Generate Doc Artifact
33-
run: |
34-
cd hugo/public && zip -r site.zip ./*
35-
- name: Upload Documentation
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: Documentation
39-
path: hugo/public/site.zip
36+
- uses: jakejarvis/s3-sync-action@master
37+
env:
38+
AWS_S3_BUCKET: ${{ secrets.YARD_S3_BUCKET }}
39+
AWS_ACCESS_KEY_ID: ${{ secrets.YARD_ACCESS_KEY_ID }}
40+
AWS_SECRET_ACCESS_KEY: ${{ secrets.YARD_SECRET_ACCESS_KEY }}
41+
AWS_REGION: us-east-1
42+
SOURCE_DIR: hugo/public
43+
DEST_DIR: ${{ github.ref_name }}

.github/workflows/rspec.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
ruby-version: ${{ matrix.ruby_version }}
1919
- name: Cache Gems
20-
uses: actions/cache@v1
20+
uses: actions/cache@v4
2121
with:
2222
path: vendor/bundle
2323
key: ${{ runner.os }}-${{matrix.ruby_version}}-aca_entities-gems-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/Gemfile' ) }}

0 commit comments

Comments
 (0)