Skip to content

Update derivation.md (#19557) #181

Update derivation.md (#19557)

Update derivation.md (#19557) #181

name: Language reference documentation
on:
push:
branches:
- 'language-reference-stable'
pull_request:
branches:
- 'language-reference-stable'
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-push:
name: Build reference documentation and push it
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Git Checkout
uses: actions/checkout@v3
with:
path: 'dotty'
fetch-depth: 0
ssh-key: ${{ secrets.DOCS_KEY }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'
- name: Generate reference documentation and test links
run: |
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'
uses: actions/checkout@v3
with:
repository: lampepfl/scala3-reference-docs
fetch-depth: 0
submodules: true
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
path: 'scala3-reference-docs'
- if: github.event_name == 'push'
run: |
\cp -a dotty/scaladoc/output/reference/. scala3-reference-docs/
cd scala3-reference-docs
git config user.name gh-actions
git config user.email actions@github.com
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
git push
fi
cd ..
backport-to-main:
name: Create pull request with backport to main
permissions:
pull-requests: write # for repo-sync/pull-request to create a PR
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3
- uses: repo-sync/pull-request@v2
with:
destination_branch: main
pr_label: area:documentation
pr_title: Sync with the stable documentation branch
pr_body: |
This pull request is syncing the main with changes from language-reference-stable.
It was created automatically after ${{ github.event.head_commit.id }} by @${{ github.event.head_commit.author.username }}
pr_assignee: ${{ github.event.head_commit.author.username }}