0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-23 12:40:11 +09:00
yude.jp/.github/workflows-disabled/cloudflare-workers.yml

47 lines
944 B
YAML
Raw Normal View History

2021-02-06 02:54:09 +09:00
name: Cloudflare Workers
2021-02-05 16:22:07 +09:00
on:
push:
branches:
- master
jobs:
2021-02-06 02:54:09 +09:00
build-and-deploy:
name: Build and Deploy
2021-02-06 02:33:50 +09:00
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-
2021-02-06 09:37:46 +09:00
- name: Install packages
2021-02-06 02:33:50 +09:00
run: yarn install --frozen-lockfile
2021-02-06 09:37:46 +09:00
- name: Build pages
2021-02-06 02:33:50 +09:00
run: yarn build
2021-02-06 09:37:46 +09:00
- name: Export
2021-02-06 02:33:50 +09:00
run: yarn export
2021-02-06 09:37:46 +09:00
- name: Add nojekyll
2021-02-06 02:33:50 +09:00
run: touch ./out/.nojekyll
2021-02-06 09:37:46 +09:00
- name: Publish to Cloudflare Workers
2021-02-06 02:54:09 +09:00
uses: cloudflare/wrangler-action@1.3.0
env:
USER: root
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
2021-02-06 03:04:05 +09:00
workingDirectory: './'