Spaces:
Sleeping
Sleeping
remove ci/cd script
Browse files- .github/workflows/main.yml +0 -31
.github/workflows/main.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
name: CI/CD Pipeline
|
2 |
-
|
3 |
-
on:
|
4 |
-
push:
|
5 |
-
branches:
|
6 |
-
- production
|
7 |
-
|
8 |
-
jobs:
|
9 |
-
build:
|
10 |
-
runs-on: ubuntu-latest
|
11 |
-
|
12 |
-
steps:
|
13 |
-
- name: install ssh keys
|
14 |
-
run: |
|
15 |
-
mkdir -p ~/.ssh
|
16 |
-
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
17 |
-
chmod 600 ~/.ssh/id_rsa
|
18 |
-
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
19 |
-
|
20 |
-
- name: connect and pull
|
21 |
-
run: |
|
22 |
-
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git checkout ${{ secrets.MAIN_BRANCH }} && git pull && exit"
|
23 |
-
|
24 |
-
- name: cleanup
|
25 |
-
run: rm -rf ~/.ssh
|
26 |
-
|
27 |
-
- name: build docker image
|
28 |
-
run: docker build -t adc .
|
29 |
-
|
30 |
-
- name: run docker image
|
31 |
-
run: docker run -p 8080:80 adc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|