Merge pull request #116 from Synicix/pipeline_validiation #37
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: Docs | |
| on: | |
| - push | |
| jobs: | |
| diagram: | |
| if: github.repository_owner == 'walkerlab' && github.event.pusher.name != 'walkerlab-repo-writer[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@v1 | |
| id: generate_app_token | |
| with: | |
| app-id: ${{ secrets.WALKERLAB_REPO_WRITER_APP_ID }} | |
| private-key: ${{ secrets.WALKERLAB_REPO_WRITER_APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.generate_app_token.outputs.token }} | |
| - name: Build Diagram | |
| uses: ./.github/actions/build-diagram | |
| - name: Sync GitHub | |
| run: | | |
| git config user.name github-actions | |
| git config user.email [email protected] | |
| git add docs/images/* | |
| git commit -m "Update crate diagram." || echo "Diagram unchanged, skipping commit." | |
| git push | |
| api: | |
| if: github.repository_owner == 'walkerlab' && github.ref == 'refs/heads/dev' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate API docs | |
| run: | | |
| cargo doc --no-deps | |
| echo "<meta http-equiv=refresh content=0;url=orcapod/index.html>" > target/doc/index.html | |
| - name: Upload | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/doc | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |