-
Notifications
You must be signed in to change notification settings - Fork 2
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
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
.github/actions/deploy-vite-to-ghpages/deploy-vite-to-ghpages.yml
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,25 @@ | ||
name: 'Deploy vite app to github pages' | ||
description: 'This action will automate the process of building and deploying a vite app to the gh-pages branch.' | ||
author: 'fechan' | ||
branding: | ||
color: blue | ||
icon: code | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run : npm i | ||
shell: bash | ||
- run : npm ci | ||
shell: bash | ||
- run : vite build | ||
shell: bash | ||
- run : git config user.name github-actions | ||
shell: bash | ||
- run : git config user.email [email protected] | ||
shell: bash | ||
- run : git --work-tree build add --all | ||
shell: bash | ||
- run : git commit -m "Automatic Deploy action run by github-actions" | ||
shell: bash | ||
- run : git push origin HEAD:gh-pages --force | ||
shell: bash |
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,19 @@ | ||
name: Vite app deployment | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Deploy react app to github pages | ||
uses: ./.github/actions/deploy-vite-to-ghpages | ||
working-directory: ./client |