Actions_tests/.forgejo/workflows/documentation_website.yaml
Yann Kervran 3f1b40d9c0
Some checks failed
/ Compilation of content (push) Successful in 12s
/ SSH deployment (push) Failing after 1m24s
CI test
2024-05-03 11:37:23 +02:00

66 lines
No EOL
2 KiB
YAML

on: [push]
jobs:
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
# 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: |
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 deployment
runs-on: bookworm
container: alpine
steps:
- name: Add NodeJs, rsync & ssh
run: |
uname -a
apk add nodejs npm openssh-client rsync
- name: Create directory
run: |
mkdir -p ~/.ssh/
- name: Create file
run: |
touch ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa
- name: Install SSH key to proper place
run: |
echo "Preparing copy"
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
- name: Adding known hosts
run: |
ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Connect and check
run: |
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"
- name: Download Artifact
uses: actions/download-artifact@v3
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