├── .github └── workflows │ └── release.yml ├── .gitignore ├── README.md └── scripts ├── download.sh └── release.sh /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | on: 2 | schedule: 3 | - cron: '0 8 * * 5' 4 | workflow_dispatch: 5 | 6 | jobs: 7 | release: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | with: 12 | fetch-depth: 0 13 | 14 | - name: Download 15 | run: scripts/download.sh 16 | 17 | - name: Process 18 | run: | 19 | git config --global user.name 'Github Actions' 20 | git config --global user.email 'milerius@users.noreply.github.com' 21 | ./scripts/release.sh 22 | 23 | permissions: 24 | actions: write 25 | contents: write 26 | deployments: write 27 | packages: write 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dokka-out 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dokka 2 | -------------------------------------------------------------------------------- /scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LATEST_RELEASE_URL=$(curl -s "https://api.github.com/repos/trustwallet/wallet-core/releases/latest" | jq -r '.assets[] | select(.name == "kdoc.zip").browser_download_url') 4 | FILENAME=$(basename "$LATEST_RELEASE_URL") 5 | rm -rf ${FILENAME} dokka-out 6 | echo "Downloading: ${LATEST_RELEASE_URL}" 7 | curl --progress-bar -fSOL ${LATEST_RELEASE_URL} 8 | echo "Unzipping: ${FILENAME}" 9 | unzip -q ${FILENAME} && rm -rf ${FILENAME} 10 | echo "Done" 11 | -------------------------------------------------------------------------------- /scripts/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | target_dir=dokka-out 4 | publish_branch=gh-pages 5 | 6 | git worktree add ../${publish_branch} ${publish_branch} 7 | 8 | cp -R ${target_dir}/* ../${publish_branch}/ 9 | 10 | pushd ../${publish_branch} 11 | git add . && git commit -m "Update docs" 12 | git push 13 | popd 14 | 15 | git worktree remove ../${publish_branch} 16 | --------------------------------------------------------------------------------