Skip to content

Commit d358731

Browse files
authored
Update CI-CD-Docs.yml
1 parent 6c66cc2 commit d358731

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/CI-CD-Docs.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v2
2222
with:
23-
persist-credentials: false
23+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
24+
- uses: dotnet/nbgv@master
25+
with:
26+
setAllVars: true
27+
- name: Setting VERSION and BRANCH env
28+
run: |
29+
echo "::set-env name=VERSION::$NBGV_NuGetPackageVersion"
30+
echo "::set-env name=BRANCH::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')"
2431
- name: Update tokens in project files
2532
uses: cschleiden/replace-tokens@v1
2633
with:
@@ -30,11 +37,11 @@ jobs:
3037
dotnet-version: '3.1.202'
3138
- name: Building library and docs
3239
run: |
33-
dotnet restore
34-
dotnet build src/bunit.core --no-restore -p:version=$VERSION
35-
dotnet build src/bunit.web --no-restore -p:version=$VERSION
36-
dotnet build src/bunit.xunit --no-restore -p:version=$VERSION
37-
dotnet build docs/docs.csproj --no-restore
40+
dotnet restore src
41+
dotnet build src/bunit.core/ --no-restore -p:version=$VERSION
42+
dotnet build src/bunit.web/ --no-restore -p:version=$VERSION
43+
dotnet build src/bunit.xunit/ --no-restore -p:version=$VERSION
44+
dotnet build docs/docs.csproj
3845
- name: Deploy
3946
uses: JamesIves/github-pages-deploy-action@releases/v3
4047
with:

0 commit comments

Comments
 (0)