@@ -16,16 +16,35 @@ concurrency:
1616
1717jobs :
1818 build-and-deploy :
19+ # Do not attempt to deploy documentation on forks
20+ if : github.repository_owner == 'UC-OSPO-Network'
1921 runs-on : ubuntu-latest
2022 steps :
2123 - uses : actions/checkout@v4
2224
2325 - uses : actions/setup-node@v4
2426 with :
25- node-version : 20
27+ node-version : 24
2628 cache : npm
2729
28- - run : make check
30+ # To set up a cross-repository deploy key:
31+ # 1. Create a key pair:
32+ # `ssh-keygen -t ed25519 -C "ucospo.net_deploy_bot@nomail"`
33+ # 2. Add the public key to the UC-OSPO-Network/UC-OSPO-Network.github.io repo
34+ # - Settings -> Deploy keys -> Add new
35+ # - Make sure the key has write permissions
36+ # 3. Add private key as a secret to UC-OSPO-Network/ucospo.net repo
37+ # - Settings -> Secrets -> New Repository Secret
38+ # - Make sure the name is the same as below: CI_DEPLOY_KEY
39+ - name : Install SSH agent
40+ if : github.ref == 'refs/heads/main'
41+ uses : webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 # v0.10.0
42+ with :
43+ ssh-private-key : ${{ secrets.CI_DEPLOY_KEY }}
44+
45+ - name : Build website
46+ if : github.ref == 'refs/heads/main'
47+ run : make html
2948
3049 - uses : peaceiris/actions-gh-pages@v4
3150 with :
3453 publish_branch : main
3554 publish_dir : _build/html
3655 cname : ucospo.net
56+
57+ - name : Deploy website
58+ if : github.ref == 'refs/heads/main'
59+ uses : JamesIves/github-pages-deploy-action@releases/v4
60+ with :
61+ git-config-name : ucospo.net_deploy_bot
62+ git-config-email : ucospo.net_deploy_bot@nomail
63+ folder : _build/html
64+ repository-name : UC-OSPO-Network/uc-OSPO-Network.github.io
65+ branch : main
66+ target-folder : latest
67+ ssh-key : true
0 commit comments