-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into entropy-invalid-fd
- Loading branch information
Showing
37 changed files
with
846 additions
and
282 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,73 @@ | ||
name: Publish Usage Guide | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
CDN: https://d3fqnyekunr9xg.cloudfront.net | ||
|
||
# By default dependabot only receives read permissions. Explicitly give it write | ||
# permissions which is needed by the ouzi-dev/commit-status-updater task. | ||
# | ||
# Updating status is relatively safe (doesnt modify source code) and caution | ||
# should be taken before adding more permissions. | ||
permissions: | ||
contents: write | ||
statuses: write | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout s2n-tls repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Set override | ||
run: rustup override set stable | ||
|
||
- uses: camshaft/install@v1 | ||
with: | ||
crate: mdbook | ||
|
||
- name: Build book | ||
run: | | ||
cd docs/usage-guide | ||
mdbook build | ||
- name: Deploy documentation to gh-pages | ||
uses: JamesIves/[email protected] | ||
if: github.event_name == 'push' | ||
with: | ||
target-folder: usage-guide | ||
folder: docs/usage-guide/book | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
id: s3 | ||
run: | | ||
TARGET="${{ github.sha }}/book" | ||
aws s3 sync docs/usage-guide/book "s3://s2n-tls-ci-artifacts/$TARGET" --acl private --follow-symlinks | ||
URL="$CDN/$TARGET/index.html" | ||
echo "URL=$URL" >> $GITHUB_OUTPUT | ||
- name: Output mdbook url | ||
uses: ouzi-dev/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
name: "book / url" | ||
status: "success" | ||
url: "${{ steps.s3.outputs.URL }}" |
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
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
Oops, something went wrong.