2023-04-04 22:41:21 +00:00
|
|
|
---
|
2022-10-11 22:59:58 +00:00
|
|
|
name: mkdocs build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-04-04 22:41:21 +00:00
|
|
|
container:
|
|
|
|
image: docker.io/rockylinux:9
|
2022-10-11 22:59:58 +00:00
|
|
|
steps:
|
2023-04-04 22:41:21 +00:00
|
|
|
- name: Install deps
|
|
|
|
run: dnf -y install git python3 python3-pip
|
2022-10-11 22:59:58 +00:00
|
|
|
|
2023-04-04 22:41:21 +00:00
|
|
|
- name: setup ssh
|
|
|
|
env:
|
|
|
|
SSH_KEY: "${{ secrets.SSH_KEY }}"
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.ssh/
|
|
|
|
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
|
|
|
chmod 0700 ~/.ssh/
|
|
|
|
chmod 0600 ~/.ssh/id_rsa
|
2022-10-11 22:59:58 +00:00
|
|
|
|
2023-04-04 22:41:21 +00:00
|
|
|
- name: checkout
|
|
|
|
env:
|
|
|
|
GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
|
|
|
run:
|
|
|
|
git clone https://git.resf.org/$GITHUB_REPOSITORY.git $GITHUB_WORKSPACE
|
2022-10-11 22:59:58 +00:00
|
|
|
|
2023-04-04 22:41:21 +00:00
|
|
|
- name: Install python requirements
|
|
|
|
run: python3 -m pip install -r requirements.txt
|
|
|
|
|
2022-10-11 22:59:58 +00:00
|
|
|
- name: Deploy
|
2023-04-04 22:41:21 +00:00
|
|
|
env:
|
|
|
|
GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
|
|
|
GIT_AUTHOR_NAME: "Rocky Bot"
|
|
|
|
GIT_AUTHOR_EMAIL: "auto@rockylinux.org"
|
|
|
|
run: |
|
|
|
|
git remote set-url origin ssh://git@git.resf.org:22220/$GITHUB_REPOSITORY.git
|
|
|
|
python3 -m mkdocs gh-deploy --force
|