|
1 |
| -name: Build And Commit Javadoc |
| 1 | +name: Update Javadoc |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | schedule:
|
5 | 5 | - cron: '0 0 * * 1' # This runs the workflow every Monday at midnight UTC
|
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build-and-commit-javadoc: |
| 9 | + fetch-latest-release: |
10 | 10 | runs-on: ubuntu-latest
|
11 | 11 |
|
12 | 12 | env:
|
13 | 13 | REPO: "processing/processing4"
|
14 |
| - REMOTE_URL: "https://github.com/processing/processing4.git" |
15 | 14 |
|
16 | 15 | steps:
|
17 |
| - - name: Checkout gh-pages branch |
18 |
| - uses: actions/checkout@v3 |
19 |
| - with: |
20 |
| - ref: gh-pages |
21 |
| - |
22 |
| - - name: Set up JDK 17 |
23 |
| - uses: actions/setup-java@v3 |
24 |
| - with: |
25 |
| - distribution: 'adopt' |
26 |
| - java-version: '17' |
27 |
| - |
28 |
| - - name: Ensure Ant is installed |
29 |
| - run: | |
30 |
| - if ! command -v ant &> /dev/null; then |
31 |
| - echo "Ant not found, installing..." |
32 |
| - sudo apt-get update && sudo apt-get install -y ant |
33 |
| - else |
34 |
| - echo "Ant is already installed" |
35 |
| - fi |
36 |
| -
|
37 | 16 | - name: Get the latest release tag and commit SHA
|
38 | 17 | id: get-commit-sha
|
39 | 18 | run: |
|
|
61 | 40 | echo "Commit SHA: $commit_sha"
|
62 | 41 | echo "commit_sha=$commit_sha" >> $GITHUB_ENV
|
63 | 42 |
|
| 43 | + build-javadoc: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + needs: fetch-latest-release |
| 46 | + |
| 47 | + env: |
| 48 | + REMOTE_URL: "https://github.com/processing/processing4.git" |
| 49 | + |
| 50 | + steps: |
| 51 | + - name: Checkout gh-pages branch |
| 52 | + uses: actions/checkout@v3 |
| 53 | + with: |
| 54 | + ref: gh-pages |
| 55 | + |
| 56 | + - name: Set up JDK 17 |
| 57 | + uses: actions/setup-java@v3 |
| 58 | + with: |
| 59 | + distribution: 'adopt' |
| 60 | + java-version: '17' |
| 61 | + |
| 62 | + - name: Ensure Ant is installed |
| 63 | + run: | |
| 64 | + if ! command -v ant &> /dev/null; then |
| 65 | + echo "Ant not found, installing..." |
| 66 | + sudo apt-get update && sudo apt-get install -y ant |
| 67 | + else |
| 68 | + echo "Ant is already installed" |
| 69 | + fi |
| 70 | +
|
64 | 71 | - name: Fetch and checkout the specific commit
|
65 | 72 | run: |
|
66 | 73 | git init processing4
|
|
84 | 91 | run: |
|
85 | 92 | rm -rf processing4/
|
86 | 93 |
|
| 94 | + commit-javadoc: |
| 95 | + runs-on: ubuntu-latest |
| 96 | + needs: build-javadoc |
| 97 | + |
| 98 | + steps: |
| 99 | + - name: Checkout gh-pages branch |
| 100 | + uses: actions/checkout@v3 |
| 101 | + with: |
| 102 | + ref: gh-pages |
| 103 | + |
87 | 104 | - name: Commit and Push changes to gh-pages if any changes exist
|
88 | 105 | run: |
|
89 | 106 | git config --global user.name "GitHub Actions"
|
|
0 commit comments