Skip to content

Commit

Permalink
Cloudflare Pages (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
satelllte authored Mar 24, 2024
1 parent 89469a1 commit 3d21aca
Show file tree
Hide file tree
Showing 5 changed files with 1,430 additions and 34 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
deployments: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Test lint
run: npm run test:lint
- name: Test formatting
run: npm run test:format
- name: Build
run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: adsr
directory: out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build
path: ./out
28 changes: 0 additions & 28 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
output: 'export',
};

module.exports = nextConfig;
Loading

0 comments on commit 3d21aca

Please sign in to comment.