Marketing & PR update #221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docusaurus | |
on: | |
pull_request: | |
push: | |
branches: ["master", "main"] | |
permissions: | |
checks: write | |
contents: write | |
jobs: | |
build-docusaurus: | |
runs-on: self-hosted | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
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@v3 | |
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: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: docusaurus/build.tar | |
retention-days: 90 | |
- 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 | |