Deploy to GitHub Pages #2158
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 20.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.17.0' | |
- run: npm install | |
env: { CI: true, TZ: America/Los_Angeles } | |
- run: npm run build | |
env: { CI: true, TZ: America/Los_Angeles } | |
- name: Configure Git | |
run: | | |
git config --global user.name "Hack Bot" | |
git config --global user.email "[email protected]" | |
- name: Upload to gh-pages | |
env: | |
CI: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TZ: America/Los_Angeles | |
run: | | |
npm run deploy -- -r https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/uclaacm/hack.uclaacm.com.git |