CI/CD
This commit is contained in:
+27
-39
@@ -73,53 +73,41 @@ jobs:
|
||||
run: |
|
||||
git clone http://gitea:3000/sajad-dev/Ai.git .
|
||||
|
||||
# - name: Install Python
|
||||
# run: |
|
||||
# apt-get install -y python3 python3-pip python3-venv git
|
||||
|
||||
# - name: Setup Python pip mirrors
|
||||
# run: |
|
||||
# pip3 config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
||||
# pip3 config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
||||
# pip3 config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
||||
# - name: Install system dependencies
|
||||
# run: |
|
||||
# apt-get install -y \
|
||||
# python3 \
|
||||
# python3-pip \
|
||||
# python3-venv \
|
||||
# pkg-config \
|
||||
# build-essential \
|
||||
# default-libmysqlclient-dev
|
||||
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python3 -m pip install --upgrade pip
|
||||
# pip3 install -r requirements.txt
|
||||
# pip3 install pytest flake8
|
||||
|
||||
# - name: Run lint
|
||||
# run: |
|
||||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
|
||||
|
||||
- name: Test33
|
||||
- name: Install Python
|
||||
run: |
|
||||
echo "${{secrets.SERVER_HOST}}"
|
||||
apt-get install -y python3 python3-pip python3-venv git
|
||||
|
||||
- name: Setup Python pip mirrors
|
||||
run: |
|
||||
pip3 config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
||||
pip3 config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
||||
pip3 config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
pkg-config \
|
||||
build-essential \
|
||||
default-libmysqlclient-dev
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install -r requirements.txt
|
||||
pip3 install pytest flake8
|
||||
|
||||
- name: Run lint
|
||||
run: |
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
|
||||
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
- name: Test2
|
||||
run: |
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||
- name: Test3
|
||||
run: |
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
- name: Test44
|
||||
run: |
|
||||
ssh-keyscan -p ${{secrets.SERVER_SSH_PORT}} -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy
|
||||
|
||||
Reference in New Issue
Block a user