-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (51 loc) · 1.43 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deploy
on:
pull_request:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build deps
run: yarn
- name: Build the website
run: yarn build
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy website
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
target-folder: .
- name: Add .nojekyll
run: |
mkdir extra/
touch extra/.nojekyll
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy .nojekyll
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
clean: false
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy to cmu server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CMU_SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "dist/"
REMOTE_HOST: ${{ secrets.CMU_HOST }}
REMOTE_USER: ${{ secrets.CMU_USER }}
TARGET: ${{ secrets.CMU_TARGET }}
SCRIPT_BEFORE: |
whoami
ls -al
SCRIPT_AFTER: |
whoami
ls -al
echo $RSYNC_STDOUT