test
Some checks failed
/ Compilation of content (push) Successful in 11s
/ SSH connection tests (push) Failing after 8s

This commit is contained in:
Yann Kervran 2024-04-19 11:14:44 +02:00
parent c62f041341
commit 55287321e7

View file

@ -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
@ -51,3 +53,10 @@ jobs:
- name: Create a file
run: |
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