Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dokka #120

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Add Dokka #120

merged 5 commits into from
Sep 18, 2024

Conversation

nitro-neal
Copy link
Contributor

No description provided.

@andresuribe87
Copy link

Is maintaining separate documentation for each release version a goal of this PR?

If so, here's a goose suggestion:


To handle versioned documentation for each release, you can update the workflow as follows:

  1. Extract the Tag or Release Version: Use ${{ github.ref_name }} to get the reference name (e.g., tag or branch name).
  2. Modify the Deployment Path: Ensure each version of the documentation is generated and deployed to a separate directory.

Here’s an example update:

 jobs:                                                                                                                                                                                                                                               
   ...                                                                                                                                                                                                                                               
   kotlin-docs:                                                                                                                                                                                                                                      
     permissions:                                                                                                                                                                                                                                    
       contents: read                                                                                                                                                                                                                                
       pages: write                                                                                                                                                                                                                                  
       id-token: write                                                                                                                                                                                                                               
     runs-on: ubuntu-latest                                                                                                                                                                                                                          
     steps:                                                                                                                                                                                                                                          
       - uses: actions/checkout@v4                                                                                                                                                                                                                   
       - name: Set up JDK 11                                                                                                                                                                                                                         
         uses: actions/setup-java@v3                                                                                                                                                                                                                 
         with:                                                                                                                                                                                                                                       
           distribution: "adopt"                                                                                                                                                                                                                     
           java-version: "11"                                                                                                                                                                                                                        
       - uses: actions/cache@v3                                                                                                                                                                                                                      
         with:                                                                                                                                                                                                                                       
           path: ~/.m2/repository                                                                                                                                                                                                                    
           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}                                                                                                                                                                                
           restore-keys: |                                                                                                                                                                                                                           
             ${{ runner.os }}-maven-                                                                                                                                                                                                                 
       - run: mvn dokka:dokka                                                                                                                                                                                                                        
         working-directory: bound/kt                                                                                                                                                                                                                 
       - run: mkdir -p _site/kt/${GITHUB_REF_NAME} && mv bound/kt/target/dokka _site/kt/${GITHUB_REF_NAME}                                                                                                                                           
         env:                                                                                                                                                                                                                                        
           GITHUB_REF_NAME: ${{ github.ref_name }}                                                                                                                                                                                                   
       - name: Setup Pages                                                                                                                                                                                                                           
         uses: actions/configure-pages@v5                                                                                                                                                                                                            
       - name: Upload artifact                                                                                                                                                                                                                       
         uses: actions/upload-pages-artifact@v3                                                                                                                                                                                                      
         with:                                                                                                                                                                                                                                       
           path: _site                                                                                                                                                                                                                               
       - name: Deploy to GitHub Pages                                                                                                                                                                                                                
         id: deployment                                                                                                                                                                                                                              
         uses: actions/deploy-pages@v4           

@KendallWeihe
Copy link
Contributor

@andresuribe87 nice! and yes IMO the docs should be linked to a given version. not entirely sure the version goose gave is the version we want, but nevertheless yes that should be a requirement.

@nitro-neal
Copy link
Contributor Author

@nitro-neal nitro-neal merged commit 59eeb81 into main Sep 18, 2024
16 checks passed
@nitro-neal nitro-neal deleted the add-dokka branch September 18, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants