Feature: home page (#8) #10
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_sample.html to root directory | |
run: | | |
cp index_sample.html docs/index.html | |
cp prowallet_logo.png docs/prowallet_logo.png | |
- name: Save artifact with build results | |
uses: actions/upload-artifact@v3 | |
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 | |
cp prowallet_logo.png dir/prowallet_logo.png | |
- 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 |