From a27b5ed3749e08dc838725d4b3b21a92de9d3594 Mon Sep 17 00:00:00 2001 From: cxykevin Date: Wed, 15 May 2024 22:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90build.yaml(=E8=AF=B7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=8F=82=E6=95=B0=EF=BC=81=EF=BC=81=EF=BC=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..33b4e57 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ + name: Build and Publish +run-name: Build and Publish book (${{ gitea.actor }}) +on: [push, workflow_dispatch, pull_request] + +jobs: + Run: + runs-on: ubuntu-latest + steps: + - name: Info + run: echo "OS=${{ runner.os }} NAME=${{ gitea.event_name }} REPO=${{ gitea.repository }} BRANCH=${{ gitea.ref }} ST=${{ job.status }} RUNID=${{ gitea.run_id }}" + - name: Prepare Source + run: | + echo "--- write source ---" + echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free">/etc/apt/sources.list + echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free">>/etc/apt/sources.list + echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free">>/etc/apt/sources.list + cat /etc/apt/sources.list + rm -rf /etc/apt/sources.list.d/* + echo "--- update source ---" + apt-get update + - name: Prepare Lftp + run: | + apt-get install lftp -y + - name: Checkout + uses: http://git.hmtsai.cn/actions/checkout@v4 + - name: Get file + run: | + git clone http://git.hmtsai.cn/cxykevin/study-area-action-deps + echo "Check..." + ls study-area-action-deps + - name: Add permission + run: chmod +x study-area-action-deps/mdbook-linux-arm + - name: Build mdbook + run: study-area-action-deps/mdbook-linux-arm build + - name: Check book + run: ls book + - name: Upload + run: lftp ${{ secrets.FTP_SITE }} -u ${{ secrets.FTP_USERNAME }},${{ secrets.FTP_PWD }} -e "mirror -R book book" +