-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Github Pages deploy | ||
run-name: Deploy next client to GH Page | ||
|
||
on: | ||
push: | ||
branches: | ||
- prod | ||
# NOTE: You may want to limit the trigger branch to be "main" or "master" etc. | ||
paths: | ||
- client/** | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate your content | ||
run: echo "Optional placeholder. Put your project's static website generator command here." | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: cd client && npm install | ||
|
||
- name: Deploy to Production | ||
run: cd client && npm run build | ||
|
||
- name: Publish current workdir (which contains generated content) to GitHub Pages | ||
uses: rayluo/github-pages-overwriter@v1.3 | ||
|
||
with: | ||
# Optional. Default value "." means the root directory of your project will be published. | ||
# You can use whatever directory your project uses, for example "wwwroot". | ||
# Such a directory does *not* have to already exist in your repo, | ||
# it could be an output directory created dynamically by your static website builder. | ||
source-directory: client/out | ||
|
||
# Optional. Default value "gh-pages". | ||
# It specifies the temporary branch which hosts the static website. | ||
# Each build will OVERWRITE this branch. | ||
# target-branch: prod |