-
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (37 loc) · 1.09 KB
/
deploy.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
name: Deploy to GitHub Pages
on:
push:
branches: [main]
schedule:
- cron: '34 2 * * *' # run every day at 2:34 AM
jobs:
gh-pages-deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: '16.x'
- run: yarn install
env: { CI: true, TZ: America/Los_Angeles }
- run: yarn build
env: { CI: true, TZ: America/Los_Angeles }
- name: Set up SSH keys
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
touch ~/.ssh/id_ed25519
chmod go-rwx ~/.ssh/id_ed25519
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
ssh -o StrictHostKeyChecking=no git@github.com || true
- name: Upload to gh-pages
env:
CI: true
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
TZ: America/Los_Angeles
run:
"yarn deploy -u 'Hack Bot <uclaacmhack+ghbot@gmail.com>' \
-r 'git@github.com:uclaacm/hack.uclaacm.com.git'"