forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified
docs
to use a workflow_dispatch
event
- Loading branch information
Showing
1 changed file
with
4 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review, labeled] | ||
merge_group: | ||
workflow_call: | ||
outputs: | ||
run: | ||
value: ${{ github.run_id }} | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
|
||
jobs: | ||
set-image: | ||
|
@@ -95,47 +95,3 @@ jobs: | |
path: ./artifacts/ | ||
retention-days: 1 | ||
if-no-files-found: error | ||
|
||
publish-rustdoc: | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
environment: subsystem-benchmarks | ||
needs: [build-rustdoc, build-implementers-guide] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ secrets.POLKADOTSDK_GHPAGES_APP_ID }} | ||
private-key: ${{ secrets.POLKADOTSDK_GHPAGES_APP_KEY }} | ||
- name: Ensure destination dir does not exist | ||
run: | | ||
rm -rf book/ | ||
rm -rf ${REF_NAME} | ||
env: | ||
REF_NAME: ${{ github.head_ref || github.ref_name }} | ||
- name: Download rustdocs | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.sha }}-doc | ||
path: ${{ github.head_ref || github.ref_name }} | ||
- name: Download guide | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.sha }}-guide | ||
path: /tmp | ||
- run: mkdir -p book | ||
- name: Move book files | ||
run: mv /tmp/book/html/* book/ | ||
- name: Push to GH-Pages branch | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ steps.app-token.outputs.token }} | ||
push-branch: "gh-pages" | ||
commit-message: "___Updated docs for ${{ github.head_ref || github.ref_name }}___" | ||
force-add: "true" | ||
files: ${{ github.head_ref || github.ref_name }}/ book/ | ||
name: devops-parity | ||
email: [email protected] |