File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : docs
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - uses : actions/setup-node@v5
11+ - name : Build
12+ run : npm run build
13+ - name : Upload artifact
14+ uses : actions/upload-artifact@v4
15+ with :
16+ name : site
17+ path : _site
18+ deploy :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ if : ${{github.event_name=='push' && github.ref=='refs/heads/main' && github.repository_owner == 'cucapra'}}
22+ steps :
23+ - name : Tailscale
24+ uses : tailscale/github-action@v2
25+ with :
26+ oauth-client-id : ${{ secrets.TS_OAUTH_CLIENT_ID }}
27+ oauth-secret : ${{ secrets.TS_OAUTH_SECRET }}
28+ tags : tag:ci
29+ - name : Download artifact
30+ uses : actions/download-artifact@v4
31+ with :
32+ name : site
33+ path : site
34+ - run : ls -R
35+ - name : rsync
36+ env :
37+ DEPLOY_HOST : courses.cit.cornell.edu
38+ DEPLOY_USER : als485
39+ DEPLOY_KEY : ${{ secrets.DEPLOY_KEY }}
40+ DEPLOY_KNOWN_HOSTS : ${{ secrets.DEPLOY_KNOWN_HOSTS }}
41+ DEPLOY_SRC : ./book/
42+ DEPLOY_DEST : coursewww/capra.cs.cornell.edu/htdocs/rvref
43+ run : |
44+ echo "$DEPLOY_KEY" > pk
45+ echo "$DEPLOY_KNOWN_HOSTS" > kh
46+ chmod 600 pk
47+ rsync --compress --recursive --checksum --itemize-changes --delete \
48+ --perms --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r \
49+ -e "ssh -i pk -o 'UserKnownHostsFile kh'" \
50+ $DEPLOY_SRC $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DEST
You can’t perform that action at this time.
0 commit comments