-
Notifications
You must be signed in to change notification settings - Fork 66
48 lines (44 loc) · 1.28 KB
/
pr-build-docusaurus.yml
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
name: PR Build Docusaurus
on:
pull_request:
branches: ["master", "main"]
permissions:
checks: write
contents: write
jobs:
build-docusaurus:
runs-on: self-hosted
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
path: 'docusaurus'
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 19
- name: Install Docusaurus
run: |
cd docusaurus
npm install
- name: Build Docusaurus
run: |
cd docusaurus
rm -rf build
npm run docusaurus clear
rm -f build.tar
npm run build
tar cf build.tar -C build --transform 's~^\./~~' .
- name: Update i18n files
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
cd docusaurus
npm run write-translations -- --locale de
git config user.name github-actions
git config user.email [email protected]
git add --all .
git diff --exit-code && git commit -am "update i18n" || true
git push