diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..53839b9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: PR Build + +on: + pull_request: + branches: ['**'] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Corepack + run: corepack enable + + - name: Install Dependency + run: yarn install + + - name: Lint test + run: yarn lint + + - name: Build test + working-directory: ./src + run: yarn build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2024d2a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,48 @@ +name: Deploy + +on: + push: + branches: ['main'] + +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: P1su + + destination-repository-name: moment-front + + 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 diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..58fd6eb --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./moment-front/* ./output +cp -R ./output ./moment-front/ \ No newline at end of file diff --git a/src/pages/Feed/components/FeedModal/FeedModal.tsx b/src/pages/Feed/components/FeedModal/FeedModal.tsx index 4badc1b..f2ff650 100644 --- a/src/pages/Feed/components/FeedModal/FeedModal.tsx +++ b/src/pages/Feed/components/FeedModal/FeedModal.tsx @@ -13,7 +13,6 @@ interface FeedModalProps { } const FeedModal = ({ - friendList, currentFriend, setCurrentFriend, closeModal,