Skip to content

Commit

Permalink
Use monthly reports from latest (non-modified) docs
Browse files Browse the repository at this point in the history
We want to publish the monthly reports from latest master always (and
possibly other non-versioned content). Hence, we need to build the
non-modified base-url docs for each version and piece the documentation
together correctly in the publish-docs workflow.
  • Loading branch information
ch1bo committed Apr 4, 2023
1 parent c5c7a0c commit 7268abe
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,19 @@ jobs:
name: test-results
path: docs/benchmarks/tests

- name: πŸ“š Documentation
working-directory: docs
run: |
yarn && yarn build
mkdir -p public/
mv build/* public/
- name: πŸ’Ύ Upload docs artifact
uses: actions/upload-artifact@v3
with:
name: docs-stable
path: docs/public

- name: πŸ“š Documentation (unstable)
if: github.ref_name != 'release'
working-directory: docs
Expand All @@ -323,18 +336,3 @@ jobs:
with:
name: docs-unstable
path: docs/public/unstable

- name: πŸ“š Documentation (stable) - only release branch
if: github.ref_name == 'release'
working-directory: docs
run: |
yarn && yarn build
mkdir -p public/
mv build/* public/
- name: πŸ’Ύ Upload docs artifact (stable) - only release branch
if: github.ref_name == 'release'
uses: actions/upload-artifact@v3
with:
name: docs-stable
path: docs/public
26 changes: 22 additions & 4 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,41 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: πŸ“₯ Download stable (last released) docs
- name: πŸ“₯ Download last released docs
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
branch: release
name: docs-stable
path: public/head-protocol/
path: docs-release

- name: πŸ“₯ Download & merge unstable docs with released
- name: πŸ“₯ Download latest docs
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
branch: master
name: docs-stable
path: docs-master

- name: πŸ“₯ Download latest /unstable docs
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
branch: master
name: docs-unstable
path: public/head-protocol/unstable/
path: docs-master-unstable

- name: πŸͺ“ Piece together docs
run: |
mkdir public
mv docs-release public/head-protocol
mv docs-master-unstable public/head-protocol/unstable
# Always use monthly reports from master
rm -r public/head-protocol/monthly
mv docs-master/monthly public/head-protocol/monthly
- name: πŸ‘‰ Create redirect
run: |
Expand Down

0 comments on commit 7268abe

Please sign in to comment.