-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #792 from dotnet/dev/andre/libtemplateUpdate
Merge latest Library.Template
- Loading branch information
Showing
15 changed files
with
225 additions
and
10 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,41 @@ | ||
name: 📚 Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
actions: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
publish-docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: ⚙ Install prerequisites | ||
run: ./init.ps1 -UpgradePrerequisites | ||
|
||
- run: dotnet docfx docfx/docfx.json | ||
name: 📚 Generate documentation | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docfx/_site | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,72 @@ | ||
name: Library.Template update | ||
|
||
# PREREQUISITE: This workflow requires the repo to be configured to allow workflows to push commits and create pull requests. | ||
# Visit https://github.com/USER/REPO/settings/actions | ||
# Under "Workflow permissions", select "Read and write permissions" and check "Allow GitHub Actions to create ...pull requests" | ||
# Click Save. | ||
|
||
on: | ||
schedule: | ||
- cron: "0 3 * * Mon" # Sun @ 8 or 9 PM Mountain Time (depending on DST) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | ||
|
||
- name: merge | ||
shell: pwsh | ||
run: | | ||
$LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated | ||
if ($LASTEXITCODE -ne 0) { | ||
exit $LASTEXITCODE | ||
} | ||
git fetch https://github.com/aarnott/Library.Template $LibTemplateBranch | ||
if ($LASTEXITCODE -ne 0) { | ||
exit $LASTEXITCODE | ||
} | ||
$LibTemplateCommit = git rev-parse FETCH_HEAD | ||
if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) { | ||
Write-Host "There are no Library.Template updates to merge." | ||
exit 0 | ||
} | ||
git -c http.extraheader="AUTHORIZATION: bearer $env:GH_TOKEN" push origin -u FETCH_HEAD:refs/heads/auto/libtemplateUpdate | ||
- name: pull request | ||
shell: pwsh | ||
run: | | ||
# If there is already an active pull request, don't create a new one. | ||
$existingPR = gh pr list -H auto/libtemplateUpdate --json url | ConvertFrom-Json | ||
if ($existingPR) { | ||
Write-Host "::warning::Skipping pull request creation because one already exists at $($existingPR[0].url)" | ||
exit 0 | ||
} | ||
$prTitle = "Merge latest Library.Template" | ||
$prBody = "This merges the latest features and fixes from [Library.Template's branch](https://github.com/AArnott/Library.Template/tree/). | ||
<details> | ||
<summary>Merge conflicts?</summary> | ||
Resolve merge conflicts locally by carrying out these steps: | ||
``` | ||
git fetch | ||
git checkout auto/libtemplateUpdate | ||
git merge origin/main | ||
# resolve conflicts | ||
git commit | ||
git push | ||
``` | ||
</details> | ||
⚠️ Do **not** squash this pull request when completing it. You must *merge* it." | ||
gh pr create -H auto/libtemplateUpdate -b $prBody -t $prTitle | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_site/ | ||
api/ |
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,48 @@ | ||
{ | ||
"metadata": [ | ||
{ | ||
"src": [ | ||
{ | ||
"src": "../src/Nerdbank.Streams", | ||
"files": [ | ||
"**/*.csproj" | ||
] | ||
} | ||
], | ||
"dest": "api" | ||
} | ||
], | ||
"build": { | ||
"content": [ | ||
{ | ||
"files": [ | ||
"**/*.{md,yml}" | ||
], | ||
"exclude": [ | ||
"_site/**" | ||
] | ||
} | ||
], | ||
"resource": [ | ||
{ | ||
"files": [ | ||
"images/**" | ||
] | ||
} | ||
], | ||
"xref": [ | ||
"https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" | ||
], | ||
"output": "_site", | ||
"template": [ | ||
"default", | ||
"modern" | ||
], | ||
"globalMetadata": { | ||
"_appName": "Nerdbank.Streams", | ||
"_appTitle": "Nerdbank.Streams", | ||
"_enableSearch": true, | ||
"pdf": false | ||
} | ||
} | ||
} |
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 @@ | ||
# Features | ||
|
||
TODO |
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,12 @@ | ||
# Getting Started | ||
|
||
## Installation | ||
|
||
Consume this library via its NuGet Package. | ||
Click on the badge to find its latest version and the instructions for consuming it that best apply to your project. | ||
|
||
[![NuGet package](https://img.shields.io/nuget/v/Nerdbank.Streams.svg)](https://nuget.org/packages/Nerdbank.Streams) | ||
|
||
## Usage | ||
|
||
TODO |
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,5 @@ | ||
- name: Features | ||
href: features.md | ||
- name: Getting Started | ||
href: getting-started.md | ||
|
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,9 @@ | ||
--- | ||
_layout: landing | ||
--- | ||
|
||
# Overview | ||
|
||
This is your docfx landing page. | ||
|
||
Click "Docs" across the top to get get started. |
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,4 @@ | ||
- name: Docs | ||
href: docs/ | ||
- name: API | ||
href: api/ |