-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use MarkdownSnippets for docs (#320)
* show usage of merging snippets into docs * Docs changes * Update Examples.cs * Docs changes * Update .github/workflows/on-push-do-docs.yml Co-authored-by: Martin Costello <martin@martincostello.com> * Update mdsnippets.json Co-authored-by: Martin Costello <martin@martincostello.com> * Update tests/HttpClientInterception.Tests/JustEat.HttpClientInterception.Tests.csproj Co-authored-by: Martin Costello <martin@martincostello.com> * Update .github/workflows/on-push-do-docs.yml Co-authored-by: Martin Costello <martin@martincostello.com> * Update tests/HttpClientInterception.Tests/Examples.cs Co-authored-by: Martin Costello <martin@martincostello.com> * Update tests/HttpClientInterception.Tests/Examples.cs Co-authored-by: Martin Costello <martin@martincostello.com> * Docs changes * Update Examples.cs * Docs changes * Update on-push-do-docs.yml * remove regions Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Martin Costello <martin@martincostello.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
967f883
commit f84b6e1
Showing
9 changed files
with
131 additions
and
27 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,24 @@ | ||
name: on-push-do-docs | ||
on: | ||
push: | ||
jobs: | ||
docs: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Run MarkdownSnippets | ||
run: | | ||
dotnet tool install --global MarkdownSnippets.Tool | ||
mdsnippets ${GITHUB_WORKSPACE} | ||
shell: bash | ||
- name: Push changes | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -m "Docs changes" -a || echo "nothing to commit" | ||
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" | ||
branch="${GITHUB_REF:11}" | ||
git push "${remote}" ${branch} || echo "nothing to push" | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Convention": "InPlaceOverwrite" | ||
} |
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
23 changes: 23 additions & 0 deletions
23
tests/HttpClientInterception.Tests/Bundles/sample-bundle.json
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,23 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/justeat/httpclient-interception/main/src/HttpClientInterception/Bundles/http-request-bundle-schema.json", | ||
"id": "my-bundle", | ||
"comment": "A bundle of HTTP requests", | ||
"items": [ | ||
{ | ||
"id": "home", | ||
"comment": "Returns the home page", | ||
"uri": "https://www.just-eat.co.uk", | ||
"contentString": "<html><head><title>Just Eat</title></head></html>" | ||
}, | ||
{ | ||
"id": "terms", | ||
"comment": "Returns the Ts & Cs", | ||
"uri": "https://public.je-apis.com/terms", | ||
"contentFormat": "json", | ||
"contentJson": { | ||
"Id": 1, | ||
"Link": "https://www.just-eat.co.uk/privacy-policy" | ||
} | ||
} | ||
] | ||
} |
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