Skip to content

Commit

Permalink
Build and publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
armanddidierjean committed May 1, 2024
1 parent 0c9fc86 commit 39d5165
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and publish on branch

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Build
run: CI=false yarn build # Using CI=false remove Treat warning as error that make the compilation fail

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_branch: build
commit_message: ${{ github.event.head_commit.message }}
4 changes: 3 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
output: "export",
};

export default nextConfig;

0 comments on commit 39d5165

Please sign in to comment.