Actions_tests/.forgejo/workflows/demo.yaml

42 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 07:47:38 +00:00
secret_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:28:19 +00:00
- name: Install SSH key to proper place
2024-04-19 07:47:38 +00:00
run: |
2024-04-19 08:28:19 +00:00
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -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"