-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature-64/header
- Loading branch information
Showing
15 changed files
with
205 additions
and
69 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,48 @@ | ||
name: Deploy-Develop | ||
|
||
on: | ||
push: | ||
branches: ['develop'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
container: pandoc/latex | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install mustache (to update the date) | ||
|
||
run: apk add ruby && gem install mustache | ||
|
||
- name: creates output | ||
|
||
run: sh ./build.sh | ||
|
||
- name: Pushes to another repository | ||
|
||
id: push_directory | ||
|
||
uses: cpina/github-action-push-to-another-repository@main | ||
|
||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }} | ||
|
||
with: | ||
source-directory: 'output' | ||
|
||
destination-github-username: Si-off | ||
|
||
destination-repository-name: partage_web_develop | ||
|
||
user-email: ${{ secrets.EMAIL }} | ||
|
||
commit-message: ${{ github.event.commits[0].message }} | ||
|
||
target-branch: main | ||
|
||
- name: Test get variable exported by push-to-another-repository | ||
|
||
run: echo $DESTINATION_CLONED_DIRECTORY |
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,5 @@ | ||
#!/bin/sh | ||
cd ../ | ||
mkdir output | ||
cp -R ./partage_web/* ./output | ||
cp -R ./output ./partage_web/ |
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
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
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
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
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
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
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
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
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
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,33 @@ | ||
'use client'; | ||
|
||
import { ReactNode, createContext, useContext, useRef } from 'react'; | ||
|
||
import { CreateMainStoreType, createMainStore } from '@/stores/useMainStore'; | ||
import { useStore } from 'zustand'; | ||
|
||
export type MainStoreApi = ReturnType<typeof createMainStore>; | ||
|
||
export const MainStoreContext = createContext<MainStoreApi | undefined>(undefined); | ||
|
||
export interface MainStoreProviderProps { | ||
children: ReactNode; | ||
} | ||
|
||
export const MainStoreProvider = ({ children }: MainStoreProviderProps) => { | ||
const storeRef = useRef<MainStoreApi>(); | ||
if (!storeRef.current) { | ||
storeRef.current = createMainStore(); | ||
} | ||
|
||
return <MainStoreContext.Provider value={storeRef.current}>{children}</MainStoreContext.Provider>; | ||
}; | ||
|
||
export const useMainStore = <T,>(selector: (store: CreateMainStoreType) => T): T => { | ||
const mainStoreContext = useContext(MainStoreContext); | ||
|
||
if (!mainStoreContext) { | ||
throw new Error('useMainStore은 반드시 MainStoreProvider 안에서 사용해야 합니다.'); | ||
} | ||
|
||
return useStore(mainStoreContext, selector); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.