Skip to content

Updated deploy to use GH token env #2120

Updated deploy to use GH token env

Updated deploy to use GH token env #2120

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 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 "uclaacmhack+ghbot@gmail.com"
- name: Upload to gh-pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TZ: America/Los_Angeles
run: |
npm run deploy -r https://$GH_TOKEN@github.com/uclaacm/hack.uclaacm.com.git