Skip to content

Fix links refering to non-existing pages #216

Fix links refering to non-existing pages

Fix links refering to non-existing pages #216

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@v4
with:
path: 'dotty'
fetch-depth: 0
ssh-key: ${{ secrets.DOCS_KEY }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- 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 ..
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: Push changes to scala3-reference-docs
if: github.event_name == 'push'
uses: actions/checkout@v4
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 [email protected]
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "UPDATE ${{ steps.date.outputs.date }}"
git push
fi
cd ..