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

Quick fix doc pipeline #902

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 22 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@ jobs:
run: |
yarn && yarn build-dev

- name: 📚 Prepare Documentation (unstable)
if: github.ref_name == 'master'
working-directory: docs
run: |
sed -i 's|head-protocol|head-protocol/unstable|' docusaurus.config.js

- name: 📚 Documentation
if: github.ref_name == 'master' || github.ref_name == 'release'
Expand All @@ -419,3 +414,25 @@ jobs:
with:
name: docs
path: docs/public

- name: 📚 Prepare /unstable Documentation
if: github.ref_name == 'master'
working-directory: docs
run: |
sed -i 's|head-protocol|head-protocol/unstable|' docusaurus.config.js

- name: 📚 /unstable Documentation
if: github.ref_name == 'master'
working-directory: docs
run: |
yarn && yarn build
mkdir public
mv build/* public

- name: 💾 Upload /unstable docs artifact
if: github.ref_name == 'master'
uses: actions/upload-artifact@v3
with:
name: docs-unstable
path: docs/public

25 changes: 17 additions & 8 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,24 @@ jobs:
path: docs-release
if_no_artifact_found: ignore

- name: 📥 Download latest unstable docs
- name: 📥 Download latest /unstable docs
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
branch: master
name: docs
name: docs-unstable
path: docs-unstable

- name: 📥 Download latest / docs
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yaml
workflow_conclusion: success
branch: master
name: docs
path: docs-master

- name: 🪓 Piece together docs
run: |
mkdir public
Expand All @@ -60,15 +69,15 @@ jobs:
# Always use monthly reports from master
# XXX: This depends on languages and assets are annoying
rm -r public/head-protocol/monthly
cp -r public/head-protocol/unstable/monthly public/head-protocol/monthly
cp -r docs-master/monthly public/head-protocol/monthly
rm -r public/head-protocol/ja/monthly
cp -r public/head-protocol/unstable/ja/monthly public/head-protocol/monthly
cp -r docs-master/ja/monthly public/head-protocol/ja/monthly
rm -r public/head-protocol/fr/monthly
cp -r public/head-protocol/unstable/fr/monthly public/head-protocol/monthly
cp -r docs-master/fr/monthly public/head-protocol/fr/monthly
# XXX: Need to copy assets as well. This will also litter with unrelated assets (js)
cp -r public/head-protocol/unstable/assets/* public/head-protocol/assets/
cp -r public/head-protocol/unstable/ja/assets/* public/head-protocol/ja/assets/
cp -r public/head-protocol/unstable/fr/assets/* public/head-protocol/fr/assets/
cp -r docs-master/assets/* public/head-protocol/assets/
cp -r docs-master/ja/assets/* public/head-protocol/ja/assets/
cp -r docs-master/fr/assets/* public/head-protocol/fr/assets/

- name: 👉 Create redirect
run: |
Expand Down