76
76
mv ../cmake-install/docs/docs ~/docs
77
77
git clean -dfx
78
78
- name : Publish docs
79
- if : ${{ github.ref == 'refs/heads/master' }}
79
+ if : ${{ ! github.event.pull_request.head.repo.fork && github.ref == 'refs/heads/master' }}
80
80
shell : bash -l {0}
81
81
run : |
82
82
git remote add tokened_docs https://IntelPython:${{ secrets.GITHUB_TOKEN }}@github.com/IntelPython/dpctl.git
91
91
git config --global user.email 'github-actions[doc-deploy-bot]@users.noreply.github.com'
92
92
git commit -m "Latest docs."
93
93
git push tokened_docs gh-pages
94
+ - name : Save built docs as an artifact
95
+ if : ${{ ! github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed'}}
96
+ uses : actions/upload-artifact@v3
97
+ with :
98
+ name : ${{ env.PACKAGE_NAME }} rendered documentation
99
+ path : ~/docs
100
+
94
101
- name : Publish pull-request docs
95
- if : ${{ github.event.pull_request && github.event.action != 'closed' }}
102
+ if : ${{ ! github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed' }}
96
103
env :
97
104
PR_NUM : ${{ github.event.number }}
98
105
shell : bash -l {0}
@@ -111,7 +118,7 @@ jobs:
111
118
git commit -m "Docs for pull request ${PR_NUM}"
112
119
git push tokened_docs gh-pages
113
120
- name : Unpublish pull-request docs
114
- if : ${{ github.event.pull_request && github.event.action == 'closed' }}
121
+ if : ${{ ! github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action == 'closed' }}
115
122
env :
116
123
PR_NUM : ${{ github.event.number }}
117
124
shell : bash -l {0}
@@ -128,7 +135,7 @@ jobs:
128
135
git commit -m "Removing docs for closed pull request ${PR_NUM}"
129
136
git push tokened_docs gh-pages
130
137
- name : Comment with URL to published pull-request docs
131
- if : ${{ github.event.pull_request && github.event.action != 'closed' }}
138
+ if : ${{ ! github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed' }}
132
139
env :
133
140
PR_NUM : ${{ github.event.number }}
134
141
uses : mshick/add-pr-comment@v1
0 commit comments