Skip to content

Commit

Permalink
Merge pull request #1 from mooxl/dev
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
mooxl committed May 17, 2023
2 parents 2889ccc + 48aa001 commit 61d9b49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/payload.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Trigger Astro build on server
on:
push:
branches:
- main
repository_dispatch:
types: [payload_update]
jobs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Clone or pull repository
on:
branches:
- prod
push:
branches:
- prod
jobs:
build:
name: Run remote SSH command
Expand All @@ -14,4 +15,4 @@ jobs:
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
script: |
ls
echo ${{ secrets.HOST }}
2 changes: 1 addition & 1 deletion astro/src/utils/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const url =
process.env.NODE_ENV === "development"
? "http://payload:3001"
: `https://${process.env.PAYLOAD_URL}`;

//test
export const getPosts = async () =>
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];

Expand Down

0 comments on commit 61d9b49

Please sign in to comment.