Skip to content

Commit

Permalink
Feature/dae 1478/moving prowallet docs to subpath (#6)
Browse files Browse the repository at this point in the history
* Refactor(!Prowallet): change instance name

* Feature: moving prowallet documentation to /prowallet sub-path
Adding redirecto from root to /prowallet

---------

Co-authored-by: juandiego <jcrisanto@zutun.io>
  • Loading branch information
juan-crisanto-qenta and jd-crisanto authored Mar 19, 2024
1 parent 85c42e6 commit 5d47328
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 26 deletions.
45 changes: 21 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ permissions:
pages: write

env:
INSTANCE: Writerside/p
ARTIFACT: webHelpP2-all.zip
PROWALLET_INSTANCE: Writerside/prowallet
PROWALLET_ARTIFACT: webHelpPROWALLET2-all.zip
PROWALLET_DIRECTORY: prowallet
DOCKER_VERSION: 233.14389

jobs:
build:
name: "Generate documentation"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -21,46 +23,41 @@ jobs:
- name: Build docs using Writerside Docker builder
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
instance: ${{ env.PROWALLET_INSTANCE }}
artifact: ${{ env.PROWALLET_ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Copy ProWallet docs
run: mkdir -p docs/${{ env.PROWALLET_DIRECTORY }} && cp -r artifacts/* docs/${{ env.PROWALLET_DIRECTORY }}

- name: Copy index.html to root directory
run: cp index.html docs/index.html

- name: Save artifact with build results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
path: docs/*
retention-days: 7
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build, test]
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: docs

- name: Create html content folder
run: |
mkdir -p dir
cp index.html dir/index.html
- name: Unzip artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
run: unzip -O UTF-8 -qq ${{ env.PROWALLET_DIRECTORY }}/${{ env.PROWALLET_ARTIFACT }} -d dir/${{ env.PROWALLET_DIRECTORY }}

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
5 changes: 5 additions & 0 deletions Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@
<footer>
<copyright>Qenta 2024</copyright>
</footer>
<build-profile instance="p">
<variables>
<noindex-content>true</noindex-content>
</variables>
</build-profile>
</buildprofiles>
2 changes: 1 addition & 1 deletion Writerside/p.tree → Writerside/prowallet.tree
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE instance-profile
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="p"
<instance-profile id="prowallet"
name="ProWallet"
start-page="Starting-Page.topic">

Expand Down
2 changes: 1 addition & 1 deletion Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<ihp version="2.0">
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<instance src="p.tree" web-path="prowallet" version="1.0"/>
<instance src="prowallet.tree" web-path="prowallet" version="1.0"/>
</ihp>
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<title>Qenta developer portal</title>
<meta http-equiv="refresh" content="0; url=/prowallet"/>
</head>
<body></body>
</html>

0 comments on commit 5d47328

Please sign in to comment.