Actions_tests/.forgejo/workflows/test.yaml

44 lines
1.3 KiB
YAML
Raw Normal View History

2024-04-16 07:19:19 +00:00
on: [push]
jobs:
2024-04-19 07:49:50 +00:00
# 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
2024-04-19 08:43:42 +00:00
ssh_test:
2024-04-19 08:28:19 +00:00
name: SSH connection tests
2024-04-19 07:47:38 +00:00
runs-on: bookworm
2024-04-19 07:49:50 +00:00
steps:
2024-04-19 08:45:15 +00:00
- name: Create directory
2024-04-19 07:47:38 +00:00
run: |
2024-04-19 08:41:08 +00:00
mkdir -p ~/.ssh/
2024-04-19 08:45:15 +00:00
- name: Install SSH key to proper place
run: |
2024-04-19 08:28:19 +00:00
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Connect and check
run: |
2024-04-19 08:34:20 +00:00
ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "ls -al"