Skip to content

Merge pull request #213 from amattu2/dev #56

Merge pull request #213 from amattu2/dev

Merge pull request #213 from amattu2/dev #56

name: Cloudflare Pages
concurrency:
group: "cloudflare-pages"
cancel-in-progress: false
on:
workflow_dispatch:
push:
tags:
- "v*"
paths:
- "src/**"
- "public/**"
jobs:
publish:
name: Publish to Cloudflare Pages
if: ${{ github.repository_owner == 'amattu2' }}
runs-on: ubuntu-latest
environment: better-vinwiki (Production)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm ci
- name: Test (Jest)
run: npm run test:ci
- name: Lint (EsLint)
run: npm run lint:ci
- name: Build
env:
REACT_APP_NAME: ${{ vars.REACT_APP_NAME }}
REACT_APP_URL: ${{ vars.REACT_APP_URL }}
REACT_APP_DESCRIPTION: ${{ vars.REACT_APP_DESCRIPTION }}
REACT_APP_SLOGAN: ${{ vars.REACT_APP_SLOGAN }}
REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }}
REACT_APP_MEDIA_API_URL: ${{ vars.REACT_APP_MEDIA_API_URL }}
REACT_APP_MEDIA_CDN_URL: ${{ vars.REACT_APP_MEDIA_CDN_URL }}
REACT_APP_API_CLIENT: ${{ vars.REACT_APP_API_CLIENT }}
run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: better-vinwiki
directory: ./build
branch: main