From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id E1A7F3858C00; Sun, 3 Sep 2023 13:58:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1A7F3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693749517; bh=uCyauUFXCtoyxYh1cD1/p7B7BOzbWVd+PdRjeF+phHU=; h=From:To:Subject:Date:From; b=VcUGLEDSRtfUo6Le64z/NAVpZ/6iJTXs+4h1WsXdCXADnHONJoVdxXRisM21mUH3C YckNrn68cnYBuQMVWbeViQN9pLC52Ox4nzeNBH3b+crOLIFtjX+9YyT73XNzm6oKp2 ki5oqBzw7H8PT6BsAq0bzqMsHZ41PLfE3jj5kLOE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon Turney To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: CI: Add documentation preview deploy step X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/main X-Git-Oldrev: e94d3e168ba2e3f05bf75c1b29c2159bf382a6fd X-Git-Newrev: 352f051cf9c14b1fac47a61f2f6e5a334ca1802f Message-Id: <20230903135837.E1A7F3858C00@sourceware.org> Date: Sun, 3 Sep 2023 13:58:37 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D352f051cf9c= 14b1fac47a61f2f6e5a334ca1802f commit 352f051cf9c14b1fac47a61f2f6e5a334ca1802f Author: Jon Turney Date: Thu Aug 10 14:51:37 2023 +0100 Cygwin: CI: Add documentation preview deploy step Diff: --- .github/workflows/cygwin.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index 8c8e78a37..e92054af8 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -18,6 +18,9 @@ jobs: pkgarch: 64 name: Fedora cross ${{ matrix.target }} =20 + env: + HAS_SSH_KEY: ${{ secrets.SSH_KEY !=3D '' }} + steps: - uses: actions/checkout@v3 =20 @@ -40,7 +43,7 @@ jobs: # install doc tools - name: Install doc tools run: | - dnf install -y dblatex docbook2X docbook-xsl xmlto python3 python3= -lxml python3-ply + dnf install -y dblatex docbook2X docbook-xsl xmlto python3 python3= -lxml python3-ply openssh-clients fmtutil-sys --byfmt pdflatex && texhash =20 # build @@ -54,6 +57,23 @@ jobs: make -C build install make -C build/*/newlib install-info install-man =20 + # deploy documentation preview + - name: Deploy documentation preview + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + # unfuck github fuckery of HOME in a container + unset HOME + # add the hosts public key to known_hosts + mkdir -p ~/.ssh/ + echo "cygwin.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKoejTnTCbXaI= IMYfbX7t4tYUOQ2bTxZC3e/td3BageF" >> ~/.ssh/known_hosts + # load the key (restricted to scp only) into ssh-agent + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ secrets.SSH_KEY }}" + # 'make install' doesn't install faq, so instead just deploy from = build directory + scp -pr build/*/winsup/doc/{cygwin-api,cygwin-ug-net,faq} cygwin-a= dmin@cygwin.com:/sourceware/www/sourceware/htdocs/cygwin/doc/preview/ + if: env.HAS_SSH_KEY =3D=3D 'true' && github.ref =3D=3D 'refs/heads/m= ain' + windows-build: runs-on: windows-latest strategy: