feat: deploy to CF pages

This commit is contained in:
Marc 2024-03-18 21:13:41 -04:00
parent f2047d10fd
commit 6c31421b26
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -2,7 +2,6 @@ on:
push: push:
branches: branches:
main main
pull_request:
env: env:
NODE_VERSION: 20 NODE_VERSION: 20
@ -93,6 +92,30 @@ jobs:
with: with:
name: build-artifacts name: build-artifacts
path: dist path: dist
deploy-frontend:
runs-on: ubuntu-latest
name: Deploy frontend
needs: build-app
steps:
- uses: actions/checkout@v4
- name: Yarn cache
uses: actions/cache@v4
id: yarn-cache-restore
with:
path: |
.yarn
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
- run: corepack enable
- name: Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name=rss-reader ./dist
deploy-functions: deploy-functions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Deploy functions name: Deploy functions