Skip to content

Commit

Permalink
Client: deploy using GH actions
Browse files Browse the repository at this point in the history
Move client deployment from
Netlify to Cloudflare via
GitHub actions.
  • Loading branch information
medmunds committed Feb 28, 2024
1 parent 4c5ad36 commit 28e71ab
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 7 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "client"

on:
push:
paths:
- "client/**"
- ".github/workflows/client.yaml"
workflow_dispatch:

defaults:
run:
working-directory: client

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: client
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: "install"
run: yarn install --frozen-lockfile
- name: "test"
run: yarn test
deploy:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: client
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: "install"
run: yarn install --frozen-lockfile
- name: "build"
run: yarn build
# uses: ryand56/[email protected]
- uses: ryand56/r2-upload-action@de3eabc2e3137ce07bc3805af441df55f535c64b
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: build
destination-dir: ./
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,3 @@ The client is (currently) a create-react-app project.
Build it with `yarn build`.

The resulting build is a static site and can be hosted just about anywhere.
(We're currently using [Netlify][netlify] for super-simple continuous deployment and easy https.)

[netlify]: https://www.netlify.com/
4 changes: 0 additions & 4 deletions netlify.toml

This file was deleted.

0 comments on commit 28e71ab

Please sign in to comment.