Skip to content

Small styling changes (#10) #10

Small styling changes (#10)

Small styling changes (#10) #10

Workflow file for this run

name: Deploy client
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client/
env:
CI: true
CI_BUILD_DIR: out
steps:
- name: Check out main repository code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
# Uses node version defined in engines
node-version-file: './client/package.json'
- name: Restore cached node modules and build artifacts
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
./client/node_modules
./client/out
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: (On cache miss) List the state of node modules
continue-on-error: true
run: npm list
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: (On cache miss) Install node modules
continue-on-error: true
run: npm ci
- name: Build site
run: npm run build
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
workingDirectory: ./client/
directory: ${{ env.CI_BUILD_DIR }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}