Skip to content

lab 2 notes

lab 2 notes #4

Workflow file for this run

name: regenerate docs
on:
push:
branches:
- trunk
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: docs
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: '21'
- name: Generate Java docs
continue-on-error: true
run: javadoc -d docs -sourcepath src/main/java -subpackages dsa -exclude dsa.lib
- name: Generate GitHub Pages artifact
run: tar --dereference --hard-dereference --directory docs -cvf docs.tar .
- name: Upload GitHub Pages artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: docs.tar
retention-days: '1'
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4