-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a workflow to deploy our site to production. The workflow works by: - Building the Jekyll site - Downloading the library documentation files from S3 and injecting them into the Jekyll build directory - Post-processing the S3 docs - Deploying the site to Netlify Additionally, it includes some additional changes to accommodate this new repository workflow. Specifically: - adds a `.ruby-version` file to the repository - this file is used to ensure that the GHAs deploy workflow and the Netlify build preview environments use the same ruby version - removes outdated references to files that used to be committed to the `api/` folder - updates the `release_checklist.md` file to remove info about post-processing since this is handled by GHAs now - removes any `link` directives in Jekyll that point to `api/` files since they're no longer committed to the repository and therefore cause build errors during `jekyll build` **Note:** One of the consequences of this change is that `api/` files will not be available in Netlify deploy previews on pull requests. Authors: - AJ Schmidt (https://github.com/ajschmidt8) Approvers: - Ray Douglass (https://github.com/raydouglass)
- Loading branch information
1 parent
af39347
commit 37880bd
Showing
21 changed files
with
237 additions
and
187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Deploy site | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build (and deploy) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
# this step uses the `.ruby-version` file | ||
- uses: ruby/setup-ruby@v1 | ||
|
||
- name: Build Jekyll Site | ||
run: | | ||
bundle install | ||
bundle exec jekyll build | ||
- uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: ${{ vars.AWS_ROLE_ARN }} | ||
aws-region: ${{ vars.AWS_REGION }} | ||
role-duration-seconds: 7200 # 2h | ||
|
||
- name: Fetch doc files from S3 | ||
run: ci/download_from_s3.sh | ||
|
||
- name: Post-process docs | ||
run: ci/post-process.sh | ||
|
||
- name: Deploy site | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_API_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DOCS_SITE_ID }} | ||
run: | | ||
npm install --global --force @aschmidt8/netlify-cli | ||
ARGS="" | ||
if [ "$GITHUB_REF_NAME" = "main" ]; then | ||
ARGS="--prod" | ||
fi | ||
netlify deploy "$ARGS" \ | ||
--dir=_site |
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 @@ | ||
3.2.2 |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
source 'https://rubygems.org' | ||
gem 'github-pages', group: :jekyll_plugins | ||
gem "just-the-docs" | ||
gem "just-the-docs", "= 0.3.3" | ||
|
||
gem "webrick", "~> 1.8" |
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
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
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
File renamed without changes.
Oops, something went wrong.