mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-22 12:10:11 +09:00
47 lines
907 B
YAML
47 lines
907 B
YAML
name: Cloudflare Workers
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
name: Build and Deploy
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.x'
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: install
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: build
|
|
run: yarn build
|
|
|
|
- name: export
|
|
run: yarn export
|
|
|
|
- name: add nojekyll
|
|
run: touch ./out/.nojekyll
|
|
|
|
- name: Publish
|
|
uses: cloudflare/wrangler-action@1.3.0
|
|
env:
|
|
USER: root
|
|
with:
|
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
|
workingDirectory: './'
|