feat: deploy to CF pages
This commit is contained in:
parent
f2047d10fd
commit
6c31421b26
1 changed files with 24 additions and 1 deletions
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue