Skip to content

Merge pull request #14 from BlackeyHou/patch-4 #8

Merge pull request #14 from BlackeyHou/patch-4

Merge pull request #14 from BlackeyHou/patch-4 #8

Workflow file for this run

name: Deploy To Cloudflare [Prod]
on:
push:
branches:
- master
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node
uses: actions/setup-node@v2.1.2
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ubuntu-node-v${{ steps.nvm.outputs.NVMRC }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
env:
NITRO_PRESET: cloudflare
NODE_OPTIONS: "--max_old_space_size=4096"
- name: Publish to Cloudflare
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
environment: 'production'