Skip to content

Merge pull request #52 from re-kast/feature/issue_27 #8

Merge pull request #52 from re-kast/feature/issue_27

Merge pull request #52 from re-kast/feature/issue_27 #8

Workflow file for this run

name: Docs
on:
push:
branches: [ develop ]
env:
MOMO_BASE_URL: ${{ secrets.MOMO_BASE_URL }}
MOMO_COLLECTION_PRIMARY_KEY: ${{ secrets.MOMO_COLLECTION_PRIMARY_KEY }}
MOMO_COLLECTION_SECONDARY_KEY: ${{ secrets.MOMO_COLLECTION_SECONDARY_KEY }}
MOMO_REMITTANCE_PRIMARY_KEY: ${{ secrets.MOMO_REMITTANCE_PRIMARY_KEY }}
MOMO_REMITTANCE_SECONDARY_KEY: ${{ secrets.MOMO_REMITTANCE_SECONDARY_KEY }}
MOMO_DISBURSEMENTS_PRIMARY_KEY: ${{ secrets.MOMO_DISBURSEMENTS_PRIMARY_KEY }}
MOMO_DISBURSEMENTS_SECONDARY_KEY: ${{ secrets.MOMO_DISBURSEMENTS_SECONDARY_KEY }}
MOMO_API_USER_ID: ${{ secrets.MOMO_API_USER_ID }}
MOMO_ENVIRONMENT: ${{ secrets.MOMO_ENVIRONMENT }}
MOMO_API_VERSION_V1: ${{ secrets.MOMO_API_VERSION_V1 }}
MOMO_API_VERSION_V2: ${{ secrets.MOMO_API_VERSION_V2 }}
jobs:
build-and-deploy-docusaurus:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install
- name: Build website
run: yarn build
- name: copy docs into build working-directory
run: |
cp -r docs ./build
cp -r CNAME ./build
- name: Deploy to gh-pages
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
build-and-deploy-dokka:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Add empty local.properties
run: |
touch local.properties
echo "MOMO_BASE_URL=${MOMO_BASE_URL}" >> local.properties
echo "MOMO_COLLECTION_PRIMARY_KEY=${MOMO_COLLECTION_PRIMARY_KEY}" >> local.properties
echo "MOMO_COLLECTION_SECONDARY_KEY=${MOMO_COLLECTION_SECONDARY_KEY}" >> local.properties
echo "MOMO_REMITTANCE_PRIMARY_KEY=${MOMO_REMITTANCE_PRIMARY_KEY}" >> local.properties
echo "MOMO_REMITTANCE_SECONDARY_KEY=${MOMO_REMITTANCE_SECONDARY_KEY}" >> local.properties
echo "MOMO_DISBURSEMENTS_PRIMARY_KEY=${MOMO_DISBURSEMENTS_PRIMARY_KEY}" >> local.properties
echo "MOMO_DISBURSEMENTS_SECONDARY_KEY=${MOMO_DISBURSEMENTS_SECONDARY_KEY}" >> local.properties
echo "MOMO_API_USER_ID=${MOMO_API_USER_ID}" >> local.properties
echo "MOMO_ENVIRONMENT=${MOMO_ENVIRONMENT}" >> local.properties
echo "MOMO_API_VERSION_V1=${MOMO_API_VERSION_V1}" >> local.properties
echo "MOMO_API_VERSION_V2=${MOMO_API_VERSION_V2}" >> local.properties
working-directory: android
- name: Add empty keystore.properties
run: touch keystore.properties
working-directory: android
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: android
- name: Document modules with dokka
run: ./gradlew dokkaHtmlMultiModule
working-directory: android
- name: Deploy 🚀
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: android/build/dokka # The folder the action should deploy.
target-folder: docs/ap1
ssh-key: ${{ secrets.DEPLOY_KEY }}