Merge pull request #5313 from dpc/24-05-17-server-version #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish docs | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
docs: | |
name: Publish docs | |
runs-on: [self-hosted, linux] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@V27 | |
with: | |
name: fedimint | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
continue-on-error: true | |
- name: Build docs | |
run: nix build -L .#nightly.ci.workspaceDocExport | |
# Seems like we are triggering it on self-hosted runner | |
# https://stackoverflow.com/questions/77816301/git-error-rpc-failed-http-400-curl-22-the-requested-url-returned-error-400 | |
- name: Increase git post buffer | |
run: git config --global http.postBuffer 524288000 | |
- if: github.repository == 'fedimint/fedimint' | |
name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./result/share/doc/ | |
cname: docs.fedimint.org | |
notifications: | |
if: always() && github.repository == 'fedimint/fedimint' && github.event_name != 'merge_group' | |
name: "Notifications" | |
timeout-minutes: 1 | |
runs-on: [self-hosted, linux] | |
needs: [ docs ] | |
steps: | |
- name: Discord notifications on failure | |
# https://stackoverflow.com/a/74562058/134409 | |
if: ${{ always() && contains(needs.*.result, 'failure') }} | |
# https://github.com/marketplace/actions/actions-status-discord | |
uses: sarisia/actions-status-discord@v1 | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
# current job is a success, but that's not what we're interested in | |
status: failure |