Skip to content

Commit 00df1e1

Browse files
authored
Update CI-CD-Docs.yml
1 parent 90953ae commit 00df1e1

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

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

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ on:
99
- '.github/**'
1010

1111
env:
12-
VERSION: '1.0.0-beta-7'
13-
BRANCH: 'master'
14-
COMMIT: ''
15-
DOCFX_SOURCE_BRANCH_NAME: 'master'
12+
VERSION: ''
1613

1714
jobs:
1815
build:
@@ -24,10 +21,8 @@ jobs:
2421
- uses: dotnet/nbgv@master
2522
with:
2623
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')"
24+
- name: Setting VERSION
25+
run: echo "::set-env name=VERSION::$NBGV_NuGetPackageVersion"
3126
- name: Update tokens in project files
3227
uses: cschleiden/replace-tokens@v1
3328
with:
@@ -43,18 +38,19 @@ jobs:
4338
dotnet build src/bunit.xunit/ --no-restore -p:version=$VERSION
4439
dotnet build docs/
4540
dotnet build docs/
41+
- name: Import GPG key
42+
uses: crazy-max/ghaction-import-gpg@v2
43+
with:
44+
git_user_signingkey: true
45+
git_commit_gpgsign: true
46+
env:
47+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
48+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
4649
- name: Deploy to GitHub Pages
4750
if: success()
4851
uses: crazy-max/ghaction-github-pages@v2
4952
with:
5053
target_branch: gh-pages
51-
build_dir: docs/_site
54+
build_dir: docs/_site
5255
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
# - name: Deploy
55-
# uses: JamesIves/github-pages-deploy-action@releases/v3
56-
# with:
57-
# ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
# BRANCH: gh-pages # The branch the action should deploy to.
59-
# FOLDER: docs/_site # The folder the action should deploy.
60-
# CLEAN: true
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)