test
This commit is contained in:
parent
c62f041341
commit
55287321e7
1 changed files with 38 additions and 29 deletions
|
@ -1,36 +1,38 @@
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
# test:
|
compilation:
|
||||||
# runs-on: bookworm
|
name: Compilation of content
|
||||||
# container: minidocks/mkdocs
|
runs-on: bookworm
|
||||||
# steps:
|
container: minidocks/mkdocs
|
||||||
# - name: Add NodeJs & Git
|
steps:
|
||||||
# run: |
|
- name: Add NodeJs & Git
|
||||||
# uname -a
|
run: |
|
||||||
# apk add nodejs npm git
|
uname -a
|
||||||
# - name: Checkout repository with git
|
apk add nodejs npm git
|
||||||
# run: |
|
- name: Checkout repository with git
|
||||||
# git clone --depth 1 https://git.numenaute.org/YannK/Actions_tests.git
|
run: |
|
||||||
# # uses: actions/checkout@v4
|
git clone --depth 1 https://git.numenaute.org/YannK/Actions_tests.git
|
||||||
# # with:
|
# uses: actions/checkout@v4
|
||||||
# # github-server-url: https://git.numenaute.org/
|
|
||||||
# - name: Show content
|
|
||||||
# run: |
|
|
||||||
# pwd
|
|
||||||
# ls -al
|
|
||||||
# - name: Compile mkdocs
|
|
||||||
# run: |
|
|
||||||
# cd Actions_tests
|
|
||||||
# mkdocs build
|
|
||||||
# - name: 'Upload Artifact'
|
|
||||||
# uses: actions/upload-artifact@v3
|
|
||||||
# with:
|
# with:
|
||||||
# name: Mkdocs_files
|
# github-server-url: https://git.numenaute.org/
|
||||||
# path: /workspace/YannK/Actions_tests/Actions_tests/site
|
- name: Show content
|
||||||
|
run: |
|
||||||
|
pwd
|
||||||
|
ls -al
|
||||||
|
- name: Compile mkdocs
|
||||||
|
run: |
|
||||||
|
cd Actions_tests
|
||||||
|
mkdocs build
|
||||||
|
- name: 'Upload Artifact'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Mkdocs_files
|
||||||
|
path: /workspace/YannK/Actions_tests/Actions_tests/site
|
||||||
|
|
||||||
ssh_test:
|
ssh_test:
|
||||||
name: SSH connection tests
|
name: SSH connection tests
|
||||||
runs-on: bookworm
|
runs-on: bookworm
|
||||||
|
needs: compilation
|
||||||
steps:
|
steps:
|
||||||
- name: Create directory
|
- name: Create directory
|
||||||
run: |
|
run: |
|
||||||
|
@ -42,7 +44,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "Preparing copy"
|
echo "Preparing copy"
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
- name: Adding knwon hosts
|
- name: Adding known hosts
|
||||||
run: |
|
run: |
|
||||||
ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
||||||
- name: Connect and check
|
- name: Connect and check
|
||||||
|
@ -51,3 +53,10 @@ jobs:
|
||||||
- name: Create a file
|
- name: Create a file
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "touch CD_TEST.txt"
|
ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "touch CD_TEST.txt"
|
||||||
|
- name: Download Artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Mkdocs_files
|
||||||
|
- name: Send the Mkdocs_files
|
||||||
|
run: |
|
||||||
|
rsync -avPz -e 'ssh -p ${{ secrets.SSH_PORT }}' . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:www
|
Loading…
Reference in a new issue