Skip to content

Commit

Permalink
add working directory arg to action
Browse files Browse the repository at this point in the history
  • Loading branch information
fechan committed May 7, 2024
1 parent 55ffbf9 commit a90f8d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/actions/deploy-vite-to-ghpages/deploy-vite-to-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,34 @@ author: 'fechan'
branding:
color: blue
icon: code
inputs:
working-directory:
description: Working directory for this action
required: true
runs:
using: 'composite'
steps:
- run : npm i
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : npm ci
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : vite build
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : git config user.name github-actions
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : git config user.email [email protected]
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : git --work-tree build add --all
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : git commit -m "Automatic Deploy action run by github-actions"
working-directory: ${{ inputs.working-directory }}
shell: bash
- run : git push origin HEAD:gh-pages --force
working-directory: ${{ inputs.working-directory }}
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/deploy-vite-to-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ jobs:

- name: Deploy react app to github pages
uses: ./.github/actions/deploy-vite-to-ghpages
working-directory: ./client
with:
working-directory: ./client

0 comments on commit a90f8d0

Please sign in to comment.