Skip to content

Commit 7244461

Browse files
authored
publish staging docs in Splice (#1045)
Signed-off-by: Itai Segall <itai.segall@digitalasset.com>
1 parent 03c482e commit 7244461

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

.github/workflows/build.docs.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,11 @@ jobs:
3838
# as it finishes fastest and we want to ensure that it includes test sources.
3939
cmd: "Test/compile docs/bundle"
4040

41-
# TODO(#1028): Reenable this
42-
# - name: Push documentation
43-
# uses: ./.github/actions/nix/run_bash_command_in_nix
44-
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
45-
# env:
46-
# GH_USER: ${{ github.actor }}
47-
# GH_TOKEN: ${{ secrets.GH_ISSUES }}
48-
# with:
49-
# additional_nix_args: "--keep GH_USER --keep GH_TOKEN"
50-
# cmd: |
51-
# REPO_DIR="$(mktemp -d)"
52-
# export GIT_SSH_COMMAND="/usr/bin/ssh"
53-
# git config --global user.email "splice-maintainers@digitalasset.com"
54-
# git config --global user.name "DA Automation"
55-
# git clone https://$GH_USER:$GH_TOKEN@github.com/digital-asset/decentralized-canton-sync.git "$REPO_DIR" -b docs
56-
# # Given that we just wanna overwrite anything an rm + cp seems more straightforward than an rsync.
57-
# rm -rf "$REPO_DIR/docs"
58-
# cp -r "docs/html/html" "$REPO_DIR/docs"
59-
# # Required to make GH service the _static directory properly.
60-
# touch "$REPO_DIR/docs/.nojekyll"
61-
# cd "$REPO_DIR"
62-
# git add .
63-
# git commit -m 'Update documentation'
64-
# git push origin docs
41+
- name: Upload documentation artifacts
42+
uses: actions/upload-pages-artifact@2d163be3ddce01512f3eea7ac5b7023b5d643ce1
43+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
44+
with:
45+
path: docs/html/html
6546

6647
- name: Post-SBT job
6748
uses: ./.github/actions/sbt/post_sbt

.github/workflows/post_merge.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@ jobs:
2020
ci:
2121
uses: ./.github/workflows/build.yml
2222
secrets: inherit
23+
24+
publish_docs:
25+
if: github.ref == 'refs/heads/main'
26+
needs: ci
27+
runs-on: self-hosted-docker-tiny
28+
29+
permissions:
30+
pages: write # to deploy to Pages
31+
id-token: write # to verify the deployment originates from an appropriate source
32+
33+
# Deploy to the github-pages environment
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@854d7aa1b99e4509c4d1b53d69b7ba4eaf39215a

0 commit comments

Comments
 (0)