Skip to content

Commit

Permalink
add gh automations
Browse files Browse the repository at this point in the history
  • Loading branch information
fechan committed May 7, 2024
1 parent 215c02d commit 55ffbf9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/actions/deploy-vite-to-ghpages/deploy-vite-to-ghpages.yml
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
19 changes: 19 additions & 0 deletions .github/workflows/deploy-vite-to-ghpages.yml
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

0 comments on commit 55ffbf9

Please sign in to comment.