Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
[ghp] separate deployment and generation
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccBarker committed Sep 25, 2023
1 parent c6a15e5 commit a4c0dad
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
name: Deploy Javadocs to GitHub Pages

# Generate and deploy on push and request.
on:
push:
branches:
- main
- milo-ghp-javadoc
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

# Jobs
jobs:
deploy:
# Generate the docs.
document:
runs-on: ubuntu-latest

steps:
Expand All @@ -26,8 +38,15 @@ jobs:
- name: Build and generate Javadocs
run: ./gradlew generateDebugJavadoc -PgenerateUML --no-daemon

# Deploy the docs.
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: document
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: actions/upload-pages-artifact@v1
with:
publish_dir: ./TeamCode/build/docs/javadoc/
github_token: ${{ secrets.GITHUB_TOKEN }}
path: './TeamCode/build/docs/javadoc/'

0 comments on commit a4c0dad

Please sign in to comment.