-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (37 loc) · 1.28 KB
/
update_docs.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
49
name: 'Update Docs'
on:
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: 'EEex'
- uses: actions/checkout@v3
with:
repository: 'Bubb13/EEex-Docs'
path: 'EEex-Docs'
token: ${{ secrets.DOCS_UPDATE_SECRET }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
check-latest: true
- name: Run UpdateDocs
run: java -cp EEex/.github/workflows/java/out/production/java/ UpdateDocs ./EEex/EEex/copy "./EEex-Docs/source/EEex Functions"
- name: Push to EEex-Docs
run: |
cd EEex-Docs
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
if git commit -m "Automatic EEex Functions Update" -m "${{ github.event.repository.full_name }}@${{ github.event.after }}"; then
git push https://github.com/Bubb13/EEex-Docs
else
echo "Docs already up-to-date, exiting..."
fi