-
Notifications
You must be signed in to change notification settings - Fork 51
40 lines (37 loc) · 1.04 KB
/
publish-docs.yaml
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
name: publish-docs
on:
push:
branches: [main]
env:
# Used by docusaurus publish-site command
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_USERNAME: camunda-bot
REPO: ${{ github.repository }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Dependencies
run: |
cd docs
npm ci
- name: Build
run: |
cd docs
npm run build
- name: Publish
run: |
cd docs
# Configure git client
echo "Git repo - $REPO"
echo "Git user - $GIT_USERNAME"
echo "Event name - ${{github.event_name }}"
git config --global user.email "[email protected]"
git config --global user.name "$GIT_USERNAME"
echo "machine github.com login $GIT_USERNAME password $GITHUB_TOKEN" > ~/.netrc
# Run docusaurus-publish
GIT_USER=$GIT_USERNAME npm run deploy