Skip to content

Commit f7f97c4

Browse files
authored
Create build-and-deploy-javadoc.yml
1 parent 74c4d24 commit f7f97c4

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and Deploy Javadoc
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1' # This runs the workflow every Monday at midnight UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout gh-pages branch
14+
uses: actions/checkout@v3
15+
with:
16+
ref: gh-pages
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: 'adopt'
22+
java-version: '17'
23+
24+
- name: Ensure Ant is installed
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y ant
28+
29+
- name: Clone the processing4 repository
30+
run: |
31+
git clone --depth 1 https://github.com/processing/processing4.git
32+
33+
- name: Generate Javadoc
34+
working-directory: processing4/build
35+
run: |
36+
ant doc
37+
38+
- name: Copy Javadoc to /docs directory
39+
run: |
40+
if [ -d "processing4/build/javadoc/core" ]; then
41+
cp -r processing4/build/javadoc/core docs/
42+
fi
43+
44+
- name: Commit and Push changes to gh-pages
45+
run: |
46+
git config --global user.name "GitHub Actions"
47+
git config --global user.email "[email protected]"
48+
git add docs/
49+
git commit -m "Update Javadocs"
50+
git push https://[email protected]/SableRaf/processing-javadoc-test.git HEAD:gh-pages
51+
env:
52+
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

0 commit comments

Comments
 (0)