Skip to content

Build and Deploy (Production) #220

Build and Deploy (Production)

Build and Deploy (Production) #220

Workflow file for this run

name: Build and Deploy (Production)
on:
schedule:
- cron: '0 23 * * *'
jobs:
build:
timeout-minutes: 10
env:
CI: 'true'
SITE_ENV: 'production'
DEPLOY_URL: 'https://dat.coolkidscomputer.club/'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Install Dependencies
uses: bahmutov/npm-install@v1
- name: Run Static Site Generator (Production)
run: yarn build
env:
NODE_ENV: production
- name: Deploy to Cloudflare (Production)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx wrangler pages deploy