feat: Kanban board (#41) #47
This file contains hidden or 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
| name: Generate API Docs | |
| on: | |
| push: | |
| branches: main | |
| workflow_dispatch: # For manual triggering | |
| jobs: | |
| generate-api-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| with: | |
| path: app | |
| - name: Checkout docs repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'necodeIT/lb_planner_docs' | |
| ref: main | |
| clean: false | |
| path: docs | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Extract flutter version | |
| id: fvmrc | |
| # get flutter key from .fvmrc file (file is in json format) | |
| run: echo "FLUTTER_VERSION=$(jq -r '.flutter' .fvmrc)" >> $GITHUB_OUTPUT | |
| working-directory: app | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvmrc.outputs.FLUTTER_VERSION }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v4.7.1 | |
| with: | |
| python-version: '3.10' | |
| - name: Get dependencies | |
| working-directory: app | |
| run: flutter pub get | |
| - name: Generate API Docs | |
| working-directory: app | |
| run: dart doc | |
| - name: Clear old documentation in /app subdir | |
| run: | | |
| rm -rf docs/app/* | |
| mkdir -p docs/app | |
| - name: Copy generated docs to /app subdir | |
| run: | | |
| cp -R app/doc/api/* docs/app/ | |
| - name: 🤌 Create GitHub App Token | |
| uses: actions/create-github-app-token@v1.11.5 | |
| id: token | |
| with: | |
| app-id: ${{ vars.CI_APP_ID }} | |
| private-key: ${{ secrets.CI_PRIVATE_KEY }} | |
| - name: Push new documentation to docs repo | |
| uses: actions-js/push@v1.5 | |
| with: | |
| github_token: ${{ steps.token.outputs.token }} | |
| repository: 'necodeIT/lb_planner_docs' | |
| branch: main | |
| message: "GitHub Actions - Update client-side API documentation to ${{ github.sha }}" | |
| directory: docs |