Skip to content

Deploy to GitHub Pages #2060

Deploy to GitHub Pages

Deploy to GitHub Pages #2060

Workflow file for this run

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 [email protected] || 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 <[email protected]>' \
-r '[email protected]:uclaacm/hack.uclaacm.com.git'"