Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(PR): gather pull request actions in PR.yml #3769

Merged
merged 13 commits into from
Mar 19, 2024
10 changes: 8 additions & 2 deletions .github/actions/docs/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
inputs:
github_token:
required: true

runs:
using: composite
steps:
Expand All @@ -9,15 +13,17 @@ runs:

- name: Build docs
run: make doc
shell: bash

- name: Copy logo image
run: cp ./images/logo.svg ./target/doc/
shell: bash

- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ inputs.github_token }}
publish_dir: ./target/doc
cname: docs.gear.rs
force_orphan: true
Expand All @@ -28,6 +34,6 @@ runs:
if: github.event_name == 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ inputs.github_token }}
publish_dir: ./target/doc
destination_dir: pr-${{ github.event.number }}
2 changes: 2 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/docs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
StackOverflowExcept1on marked this conversation as resolved.
Show resolved Hide resolved

check:
needs: status
Expand Down
Loading