diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91add81f44ae..42176a760e1b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,11 @@ name: Dotty on: push: + branches-ignore: + - 'language-reference-stable' pull_request: + branches-ignore: + - 'language-reference-stable' schedule: - cron: '0 3 * * *' # Every day at 3 AM workflow_dispatch: diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 53800df7bb00..ebe65dfc3cde 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,10 +1,15 @@ name: Scala CLA -on: [pull_request] +on: + pull_request: + push: + branches: + - 'language-reference-backport' jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: ./project/scripts/check-cla.sh + if: github.event_name == 'pull_request' env: AUTHOR: ${{ github.event.pull_request.user.login }} diff --git a/.github/workflows/language-reference.yaml b/.github/workflows/language-reference.yaml index 4a1277ac2c50..1668b5424fa4 100644 --- a/.github/workflows/language-reference.yaml +++ b/.github/workflows/language-reference.yaml @@ -22,6 +22,7 @@ jobs: with: path: 'dotty' ref: 'language-reference-stable' + fetch-depth: 0 ssh-key: ${{ secrets.DOCS_KEY }} - name: Cache Coursier @@ -43,8 +44,10 @@ jobs: - name: Generate reference documentation and test links run: | - ./dotty/project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links - ./dotty/project/scripts/docsLinksStability ./dotty/scaladoc/output/reference ./dotty/project/scripts/expected-links/reference-expected-links.txt + cd dotty + ./project/scripts/sbt scaladoc/generateReferenceDocumentation --no-regenerate-expected-links + ./project/scripts/docsLinksStability ./scaladoc/output/reference ./project/scripts/expected-links/reference-expected-links.txt + cd .. - name: Push changes to scala3-reference-docs if: github.event_name == 'push' @@ -63,8 +66,10 @@ jobs: git config user.name gh-actions git config user.email actions@github.com git add . - git commit -m "UPDATE ${{ steps.date.outputs.date }}" - git push + if ! git diff-index --quiet HEAD; then + git commit -m "UPDATE ${{ steps.date.outputs.date }}" + git push + fi cd .. - name: Merge changes to main @@ -73,14 +78,20 @@ jobs: cd dotty git fetch origin main:main git checkout main + git config user.name gh-actions + git config user.email actions@github.com git merge language-reference-stable cd .. - - name: Create pull reuqest with backport to main + - name: Create pull request with backport to main if: github.event_name == 'push' uses: peter-evans/create-pull-request@v4 with: path: dotty branch: language-reference-backport labels: area:documentation + title: Backport changes from stable documentation branch + body: This pull request is created automatically after push to stable documentation branch and backports the changes + reviewers: pikinier20,julienrf + assignees: pikinier20 diff --git a/.github/workflows/scaladoc.yaml b/.github/workflows/scaladoc.yaml index 4c8d2968a313..bab4ac71fe46 100644 --- a/.github/workflows/scaladoc.yaml +++ b/.github/workflows/scaladoc.yaml @@ -2,7 +2,11 @@ name: scaladoc on: push: + branches-ignore: + - 'language-reference-stable' pull_request: + branches-ignore: + - 'language-reference-stable' jobs: build: env: