forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (54 loc) · 1.85 KB
/
Copy pathlanguage-reference.yaml
File metadata and controls
63 lines (54 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Language reference documentation
on: [workflow_dispatch] # Disabled on fork
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@v7
with:
path: 'dotty'
fetch-depth: 0
ssh-key: ${{ secrets.DOCS_KEY }}
- name: Set up JDK 17
uses: actions/setup-java@v5
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 ..
- name: Push changes to scala3-reference-docs
if: github.event_name == 'push'
uses: actions/checkout@v7
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 ..