2023-09-09 04:34:36 +00:00
|
|
|
name: cloudflare
|
|
|
|
|
2023-09-09 03:59:05 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
2023-09-09 04:36:29 +00:00
|
|
|
repository_dispatch:
|
2023-09-09 04:34:36 +00:00
|
|
|
|
2023-09-09 03:59:05 +00:00
|
|
|
jobs:
|
2023-09-09 04:34:36 +00:00
|
|
|
ci:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ ubuntu-latest ]
|
|
|
|
node: [ 14 ]
|
|
|
|
|
2023-09-09 03:59:05 +00:00
|
|
|
steps:
|
2023-09-09 04:34:36 +00:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: Cache node_modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ matrix.os }}-node-v${{ matrix.node }}-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
|
|
|
|
|
|
|
|
- name: Publish to Cloudflare
|
2023-09-09 03:59:05 +00:00
|
|
|
uses: cloudflare/wrangler-action@2.0.0
|
|
|
|
with:
|
|
|
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|