Skip to content

Commit

Permalink
[tuanm] deploy via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuanm committed Jan 6, 2024
1 parent b1b59b0 commit 5d2be03
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: deploy v2

on:
push:
branches: [v2-main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2.3.1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '18.x'

- name: Install dependencies
run: yarn install

- name: Build
run: echo "NEXT_PUBLIC_SERVER_BASE_URL=$NEXT_PUBLIC_SERVER_BASE_URL" > .env && yarn build && yarn export && touch ./build/.nojekyll
env:
NEXT_PUBLIC_SERVER_BASE_URL: ${{ vars.NEXT_PUBLIC_SERVER_BASE_URL }}

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: deploy/v2
FOLDER: build
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
basePath: '/documentizer',
output: 'standalone',
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dev": "next",
"start": "next start",
"build": "next build",
"export": "next export -o build",
"format": "prettier --write 'src/**/*.{js,ts,tsx,scss,css}'",
"format:staged": "pretty-quick --pattern 'src/**/*.{js,ts,tsx,scss,css}' --staged"
},
Expand Down

0 comments on commit 5d2be03

Please sign in to comment.