From 29b722f2f91afebc9bbb6d6ff9cfb116f2d81579 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Tue, 4 Apr 2023 18:24:39 -0400 Subject: [PATCH] ci: update for gitea runners --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ .github/workflows/gh.yml | 29 --------------------------- 2 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/gh.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..331ac3a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: mkdocs build +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + container: + image: docker.io/rockylinux:9 + steps: + - name: Install deps + run: dnf -y install git python3 python3-pip + + - 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 + + - 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 + + - name: Install python requirements + run: python3 -m pip install -r requirements.txt + + - name: Deploy + 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 diff --git a/.github/workflows/gh.yml b/.github/workflows/gh.yml deleted file mode 100644 index 72f4983..0000000 --- a/.github/workflows/gh.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: mkdocs build -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [ 3.8 ] - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - - name: Install requirements - run: python3 -m pip install -r requirements.txt - - - name: Deploy - run: python3 -m mkdocs gh-deploy --force -...