CI/CD
This commit is contained in:
+27
-39
@@ -73,53 +73,41 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone http://gitea:3000/sajad-dev/Ai.git .
|
git clone http://gitea:3000/sajad-dev/Ai.git .
|
||||||
|
|
||||||
# - name: Install Python
|
- 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
|
|
||||||
run: |
|
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
|
- name: Setup SSH key
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
- name: Test2
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||||
- name: Test3
|
|
||||||
run: |
|
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
|
||||||
- name: Test44
|
|
||||||
run: |
|
|
||||||
ssh-keyscan -p ${{secrets.SERVER_SSH_PORT}} -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan -p ${{secrets.SERVER_SSH_PORT}} -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
|||||||
Reference in New Issue
Block a user