diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 55% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index a5c3c2d..30ba026 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test +name: CI on: pull_request: @@ -9,8 +9,11 @@ on: - main jobs: - test: + ci: runs-on: ubuntu-latest + permissions: + contents: read + deployments: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -26,3 +29,13 @@ jobs: run: bun run test:lint - name: Test (format) run: bun run test:format + - name: Build + run: bun run build + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: displacementx + directory: out + gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/next.config.js b/next.config.js index 658404a..dc29843 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,6 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + output: 'export', +}; module.exports = nextConfig;