Skip to content

Commit 2ecd276

Browse files
authored
Test from PR 5 (#1313)
* Empty commit ...1 * Empty commit ...2 * Empty commit ...3 * test * Change docs
1 parent 8854212 commit 2ecd276

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

.github/workflows/dotnet.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ jobs:
3838
os: [ubuntu-latest, windows-latest, macos-latest]
3939
runs-on: ${{ matrix.os }}
4040
steps:
41-
42-
- name: Get merged pull request
43-
uses: actions-ecosystem/action-get-merged-pull-request@v1
44-
id: get_merged_pull_request
45-
with:
46-
github_token: ${{ secrets.GITHUB_TOKEN }}
47-
- name: Print merged pull request
48-
run: echo 'PR number = ${{steps.get_merged_pull_request.outputs.number}}'
49-
5041
- name: Setup PostgreSQL
5142
uses: ikalnytskyi/action-setup-postgres@v4
5243
with:
@@ -77,19 +68,6 @@ jobs:
7768
Write-Host "$(pwsh --version) is installed at $PSHOME"
7869
psql --version
7970
Write-Host "Using .NET SDK: $(dotnet --version)"
80-
- name: Print messages
81-
shell: pwsh
82-
env:
83-
MY_MSG: "Auto-generated documentation from ${{ github.event.pull_request.merged == true && github.event.pull_request.url || github.sha }}"
84-
run: |
85-
Write-Host "Message = $env:MY_MSG"
86-
- name: Dump event object
87-
shell: pwsh
88-
env:
89-
MY_JSON: "${{toJSON(github.event)}}"
90-
run: |
91-
Write-Host "Message = $env:MY_JSON"
92-
#
9371
- name: Git checkout
9472
uses: actions/checkout@v3
9573
- name: Restore tools
@@ -281,6 +259,16 @@ jobs:
281259
run: |
282260
dotnet nuget add source --username 'json-api-dotnet' --password "$env:GITHUB_TOKEN" --store-password-in-clear-text --name 'github' 'https://nuget.pkg.github.com/json-api-dotnet/index.json'
283261
dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:GITHUB_TOKEN" --source 'github'
262+
- name: Find merged pull request
263+
uses: actions-ecosystem/action-get-merged-pull-request@v1
264+
id: find_merged_pull_request
265+
with:
266+
github_token: ${{ secrets.GITHUB_TOKEN }}
267+
# TODO: Remove test
268+
- name: Print merged pull request
269+
run: |
270+
echo 'PR number = ${{ steps.find_merged_pull_request.outputs.number }}'
271+
echo 'SHA = ${{ github.sha }}'
284272
- name: Publish documentation
285273
#if: github.event_name == 'push' && github.ref == 'refs/heads/master'
286274
uses: peaceiris/actions-gh-pages@v3
@@ -291,7 +279,7 @@ jobs:
291279
#publish_branch: gh-pages
292280
publish_dir: ./documentation
293281
#commit_message: 'Auto-generated documentation from: ${{ github.event.head_commit.message }}'
294-
full_commit_message: "Auto-generated documentation from ${{ github.event.pull_request.merged == true && github.event.pull_request.url || github.sha }}"
282+
full_commit_message: "Auto-generated documentation from ${{ steps.find_merged_pull_request.outputs.number && format('#{0}', steps.find_merged_pull_request.outputs.number) || github.sha }}"
295283

296284
- name: Publish to NuGet
297285
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

docs/home/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">

0 commit comments

Comments
 (0)