Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update doc.yml
  • Loading branch information
aduh95 authored Mar 21, 2023
commit 5e51835f1820dc3efa4f0960e2be2c77a6790016
9 changes: 6 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ jobs:
with:
# We want to persist credentials so we can push to gh-pages
ref: gh-pages
- name: Erase previous version (if it exists)
run: rm -rf "${{ github.event.pull_request.number }}"
- name: Download tarball from build job
uses: actions/download-artifact@v3
with:
name: docs
path: ${{ github.event.pull_request.number }}
- name: Commit the doc preview to gh-pages
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add "${{ github.event.pull_request.number }}"
git commit -m "Add/Update preview for ${{ github.event.pull_request.html_url }}" -m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.repo.name }}/${{ github.event.pull_request.number }}/"
git commit \
--author="Node.js GitHub Bot <github-bot@iojs.org>"
-m "Add/Update preview for ${{ github.event.pull_request.html_url }}" \
-m "The preview will be available at https://${{ github.repository_owner }}.github.io/${{ github.event.pull_request.base.repo.name }}/${{ github.event.pull_request.number }}/api/"
git push origin HEAD:gh-pages