diff --git a/.github/workflows/build-and-deploy-javadoc.yml b/.github/workflows/build-and-deploy-javadoc.yml index 9c50a70..559a637 100644 --- a/.github/workflows/build-and-deploy-javadoc.yml +++ b/.github/workflows/build-and-deploy-javadoc.yml @@ -48,10 +48,10 @@ jobs: REMOTE_URL: "https://github.com/processing/processing4.git" steps: - - name: Checkout gh-pages branch + - name: Checkout repository uses: actions/checkout@v3 with: - ref: gh-pages + fetch-depth: 0 - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -79,47 +79,15 @@ jobs: run: | ant doc - - name: Copy Javadoc to /docs directory - run: | - if [ -d "processing4/build/javadoc/core" ]; then - cp -r processing4/build/javadoc/core ../docs/ - fi - - name: Upload Javadocs artifact uses: actions/upload-pages-artifact@v1 with: - path: ./docs + path: processing4/build/javadoc/core - name: Clean up the processing4 directory run: | rm -rf processing4/ - commit-javadoc: - runs-on: ubuntu-latest - needs: build-javadoc - - steps: - - name: Checkout gh-pages branch - uses: actions/checkout@v3 - with: - repository: processing/processing4-javadocs - ref: gh-pages - fetch-depth: 0 - - - name: Commit and Push changes to gh-pages if any changes exist - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - if [ -n "$(git status --porcelain docs/)" ]; then - git add docs/ - git commit -m "Update Javadocs" - git push https://$PAT_TOKEN@github.com/processing/processing4-javadocs.git HEAD:gh-pages - else - echo "No changes to commit." - fi - env: - PAT_TOKEN: ${{ secrets.PAT_TOKEN }} - deploy-javadoc: needs: build-javadoc permissions: diff --git a/README.md b/README.md index e2013d3..7b24f9f 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ This repository uses a custom GitHub Actions workflow [`build-and-deploy-javadoc The workflow clones the `processing/processing4` repository, gets the commit corresponding to the latest release, builds the Javadocs using `ant`, and copies the generated files to the `/docs` directory of this repository. The updated Javadocs are then committed and pushed to the `gh-pages` branch. -We've set "Deploy from branch" in the repo settings to trigger on push to the `gh-pages` branch. Every time the `build-and-deploy-javadoc.yml` workflow completes, it will trigger a deploy to GitHub pages. - The workflow is triggered every Monday at midnight (UTC). A maintainer can manually trigger the workflow if needed. ## Legacy