Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shifting from .md to html in Nuclia #881

Open
wants to merge 3 commits into
base: nuclia_widget
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
41 changes: 15 additions & 26 deletions .github/workflows/nuclia_sync.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
name: Nuclia Sync

on: [push]
on:
push:

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- name: Set up Python ${{ matrix.python-version }}
justdaksh marked this conversation as resolved.
Show resolved Hide resolved
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: ${{secrets.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 github-actions@github.com
git add .
git commit -m "Nuclia Sync: Updated docs"
git push
Loading
Loading