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]
|
||||
jobs:
|
||||
# test:
|
||||
# runs-on: bookworm
|
||||
# container: minidocks/mkdocs
|
||||
# steps:
|
||||
# - name: Add NodeJs & Git
|
||||
# run: |
|
||||
# uname -a
|
||||
# apk add nodejs npm git
|
||||
# - name: Checkout repository with git
|
||||
# run: |
|
||||
# git clone --depth 1 https://git.numenaute.org/YannK/Actions_tests.git
|
||||
# # uses: actions/checkout@v4
|
||||
# # with:
|
||||
# # 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:
|
||||
# name: Mkdocs_files
|
||||
# path: /workspace/YannK/Actions_tests/Actions_tests/site
|
||||
compilation:
|
||||
name: Compilation of content
|
||||
runs-on: bookworm
|
||||
container: minidocks/mkdocs
|
||||
steps:
|
||||
- name: Add NodeJs & Git
|
||||
run: |
|
||||
uname -a
|
||||
apk add nodejs npm git
|
||||
- name: Checkout repository with git
|
||||
run: |
|
||||
git clone --depth 1 https://git.numenaute.org/YannK/Actions_tests.git
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# 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:
|
||||
name: Mkdocs_files
|
||||
path: /workspace/YannK/Actions_tests/Actions_tests/site
|
||||
|
||||
ssh_test:
|
||||
name: SSH connection tests
|
||||
runs-on: bookworm
|
||||
needs: compilation
|
||||
steps:
|
||||
- name: Create directory
|
||||
run: |
|
||||
|
@ -42,7 +44,7 @@ jobs:
|
|||
run: |
|
||||
echo "Preparing copy"
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||
- name: Adding knwon hosts
|
||||
- name: Adding known hosts
|
||||
run: |
|
||||
ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
||||
- name: Connect and check
|
||||
|
@ -50,4 +52,11 @@ jobs:
|
|||
ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "ls -al"
|
||||
- name: Create a file
|
||||
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