Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 12 additions & 23 deletions .github/workflows/nuclia_sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Nuclia Sync

on: [push]
on:
push:

jobs:
sync:
runs-on: ubuntu-latest
Expand All @@ -14,35 +16,22 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
cache: 'pip'

- name: Install requirements
run: |
pip install -q -r requirements.txt
python -m pip install --upgrade pip
pip install -q -r requirements.txt -c constraints.txt
pip freeze

- name: Building html
run: |
make html

- name: Run Nuclia Sync
env:
DEPLOY_NUCLIA_URL: ${{vars.DEPLOY_NUCLIA_URL}}
DEPLOY_NUCLIA_TOKEN: ${{secrets.DEPLOY_NUCLIA_TOKEN}}
run: |
python3 upload.py

- name: Check for changes in nuclia_sync.json
id: check_changes
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
echo "Changed files: $CHANGED_FILES"
if echo "$CHANGED_FILES" | grep -q 'nuclia_sync.json'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi

- name: Commit changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add .
git commit -m "Nuclia Sync: Updated docs"
git push
Loading