-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (40 loc) · 1.1 KB
/
publish-blog.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
name: Publish Chaos Blog
on:
push:
branches:
- main
paths:
- chaos-days/**
workflow_dispatch: { }
env:
# Used by docusaurus publish-site command
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 chaos-days
npm i
- name: Build
run: |
cd chaos-days
npm run build
- name: Publish
run: |
cd chaos-days
# Configure git client
echo "Git repo - $REPO"
echo "Git user - $GIT_USERNAME"
echo "Event name - ${{github.event_name }}"
git config --global user.email "$GIT_USERNAME@users.noreply.github.com"
git config --global user.name "$GIT_USERNAME"
echo "machine github.com login $GIT_USERNAME password ${{ secrets.GITHUB_TOKEN }}" > ~/.netrc
# Run docusaurus-publish
GIT_USER=$GIT_USERNAME npm run deploy