Feature/dae 1478/moving prowallet docs to subpath (#6) #8
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
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
pages: write | |
env: | |
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 | |
uses: actions/checkout@v4 | |
- name: Build docs using Writerside Docker builder | |
uses: JetBrains/writerside-github-action@v4 | |
with: | |
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@v4 | |
with: | |
name: docs | |
path: docs/* | |
retention-days: 7 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
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.PROWALLET_DIRECTORY }}/${{ env.PROWALLET_ARTIFACT }} -d dir/${{ env.PROWALLET_DIRECTORY }} | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Package and upload Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dir | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |