-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.83 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
44 lines (40 loc) · 1.83 KB
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
name: Deploy docs
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check commit message format
id: commit-check
run: |
commit_message=$(git log -1 --pretty=%B)
if [[ "$commit_message" =~ ^Update\ \'compiled_docs\'\ file\ :page_facing_up:$ ]]; then
echo "Skipping steps"
echo "::set-output name=skip_steps::true"
fi
- name: Setup docs
if: steps.commit-check.outputs.skip_steps != 'true'
uses: ./.github/actions/setup-docs
- name: Config user credentials
if: steps.commit-check.outputs.skip_steps != 'true'
run: |
git config --local user.email "${{ secrets.ETENDOBOT_EMAIL }}"
git config --local user.name "${{ secrets.ETENDOBOT_NAME }}"
- name: Deploy docs
if: steps.commit-check.outputs.skip_steps != 'true'
run: mkdocs gh-deploy --force
- name: Run Algolia Script (EN)
if: steps.commit-check.outputs.skip_steps != 'true'
run: python algolia.py ${{ secrets.ALGOLIA_WRITE_INDEX_KEY }} --app-id=XMLZ1ZZEY7 --index-name=etendo_docs_index2 --site-url=https://docs.etendo.software
- name: Run Algolia Script (ES)
if: steps.commit-check.outputs.skip_steps != 'true'
run: python algolia.py ${{ secrets.ALGOLIA_WRITE_INDEX_KEY }} --app-id=XMLZ1ZZEY7 --index-name=etendo_docs_index2_es --docs-dir=docs/es --site-url=https://docs.etendo.software/es --locale=es