diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2023-08-31 20:21:56 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2023-09-03 14:57:53 +0100 |
commit | 24b029ba8ea78cee7d94bc736ff4462eb8889f30 (patch) | |
tree | 2a183b41956f24ed0cd9f1ee7d0c4c5b30cefb90 /.github/workflows/cygwin.yml | |
parent | 352f051cf9c14b1fac47a61f2f6e5a334ca1802f (diff) | |
download | newlib-24b029ba8ea78cee7d94bc736ff4462eb8889f30.zip newlib-24b029ba8ea78cee7d94bc736ff4462eb8889f30.tar.gz newlib-24b029ba8ea78cee7d94bc736ff4462eb8889f30.tar.bz2 |
Cygwin: CI: Also deploy documentation for release tags
Diffstat (limited to '.github/workflows/cygwin.yml')
-rw-r--r-- | .github/workflows/cygwin.yml | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index e92054a..be377bb 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -5,6 +5,8 @@ on: # since master is a symbolic reference to main, don't run for both branches-ignore: - 'master' + tags: + - '*' jobs: fedora-build: @@ -57,11 +59,25 @@ jobs: make -C build install make -C build/*/newlib install-info install-man - # deploy documentation preview - - name: Deploy documentation preview + # deploy documentation + - name: Deploy documentation env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | + # pushes to main are deployed as preview + # pushes to cygwin-n.n.n (but not 'cygwin-n.n.n.dev') tags are deployed as stable + # other references are ignored by this step + case "${{ github.ref }}" in + refs/heads/main) + DEST='preview' + ;; + refs/tags/cygwin-[0-9.]*) + DEST='stable' + ;; + *) + exit 0 + ;; + esac # unfuck github fuckery of HOME in a container unset HOME # add the hosts public key to known_hosts @@ -71,8 +87,8 @@ jobs: 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-admin@cygwin.com:/sourceware/www/sourceware/htdocs/cygwin/doc/preview/ - if: env.HAS_SSH_KEY == 'true' && github.ref == 'refs/heads/main' + scp -pr build/*/winsup/doc/{cygwin-api,cygwin-ug-net,faq} cygwin-admin@cygwin.com:/sourceware/www/sourceware/htdocs/cygwin/doc/${DEST}/ + if: env.HAS_SSH_KEY == 'true' windows-build: runs-on: windows-latest |