Skip to content

Commit

Permalink
modified docs to use a workflow_dispatch event
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Sep 2, 2024
1 parent 90f219f commit dfa9456
Showing 1 changed file with 4 additions and 48 deletions.
52 changes: 4 additions & 48 deletions .github/workflows/docs.yml
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:
Expand Down Expand Up @@ -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]

0 comments on commit dfa9456

Please sign in to comment.