forked from sodadata/soda-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Split docs build and trigger the code build only if non-docs changes are pushed - Update editor config for YAML files with 2 spaces for indent
- Loading branch information
1 parent
2e9f417
commit 2e0a52f
Showing
3 changed files
with
55 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and publish Soda SQL Docs | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'docs/**' | ||
|
||
jobs: | ||
publish-docs: | ||
name: Deploy documentation | ||
if: github.ref == 'refs/heads/main' | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-20.04 | ||
env: | ||
AWS_CLOUDFRONT_ID: E2OAY23FHJNRE7 | ||
AWS_DOCS_BUCKET: soda-public-docs | ||
AWS_DOCS_PATH: /soda-sql | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure AWS | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_DOCS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_BUILD_DEFAULT_REGION }} | ||
- name: Set up Ruby 2.7 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ./docs/vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: Build docs | ||
working-directory: ./docs | ||
run: | | ||
gem install bundler | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
bundle exec jekyll build | ||
- name: Publish docs | ||
run: aws s3 sync --delete ./docs/_site s3://${AWS_DOCS_BUCKET}${AWS_DOCS_PATH} | ||
- name: Invalidate cache | ||
run: aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_ID} --paths "${AWS_DOCS_PATH}" "${AWS_DOCS_PATH}/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters