website.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. name: website
  16. # Controls when the action will run.
  17. on:
  18. push:
  19. branches: [ trunk ]
  20. jobs:
  21. build:
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout Hadoop trunk
  25. uses: actions/checkout@v3
  26. with:
  27. repository: apache/hadoop
  28. - name: Set up JDK 8
  29. uses: actions/setup-java@v3
  30. with:
  31. java-version: '8'
  32. distribution: 'temurin'
  33. - name: Cache local Maven repository
  34. uses: actions/cache@v3
  35. with:
  36. path: ~/.m2/repository
  37. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  38. restore-keys: |
  39. ${{ runner.os }}-maven-
  40. - name: Build Hadoop maven plugins
  41. run: cd hadoop-maven-plugins && mvn --batch-mode install
  42. - name: Build Hadoop
  43. run: mvn clean install -DskipTests -DskipShade
  44. - name: Build document
  45. run: mvn clean site
  46. - name: Stage document
  47. run: mvn site:stage -DstagingDirectory=${GITHUB_WORKSPACE}/staging/
  48. - name: Deploy to GitHub Pages
  49. uses: peaceiris/actions-gh-pages@v3
  50. with:
  51. github_token: ${{ secrets.GITHUB_TOKEN }}
  52. publish_dir: ./staging/hadoop-project
  53. user_name: 'github-actions[bot]'
  54. user_email: 'github-actions[bot]@users.noreply.github.com'
  55. force_orphan: true