forked from sig_cloud/wiki
ci: update for gitea runners
This commit is contained in:
parent
6fb971f5f4
commit
743d0f5166
41
.github/workflows/build.yml
vendored
41
.github/workflows/build.yml
vendored
@ -1,28 +1,41 @@
|
|||||||
|
---
|
||||||
name: mkdocs build
|
name: mkdocs build
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
container:
|
||||||
matrix:
|
image: docker.io/rockylinux:9
|
||||||
python-version: [ 3.8 ]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Install deps
|
||||||
|
run: dnf -y install git python3 python3-pip
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: setup ssh
|
||||||
uses: actions/setup-python@v2
|
env:
|
||||||
with:
|
SSH_KEY: "${{ secrets.SSH_KEY }}"
|
||||||
python-version: ${{ matrix.python-version }}
|
run: |
|
||||||
architecture: x64
|
mkdir -p ~/.ssh/
|
||||||
|
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
||||||
|
chmod 0700 ~/.ssh/
|
||||||
|
chmod 0600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
- name: Install requirements
|
- 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
|
run: python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: python3 -m mkdocs gh-deploy --force
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user