commit
61d9b49a0b
3
.github/workflows/payload.yml
vendored
3
.github/workflows/payload.yml
vendored
@ -1,8 +1,5 @@
|
||||
name: Trigger Astro build on server
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
repository_dispatch:
|
||||
types: [payload_update]
|
||||
jobs:
|
||||
|
7
.github/workflows/push.yml
vendored
7
.github/workflows/push.yml
vendored
@ -1,7 +1,8 @@
|
||||
name: Clone or pull repository
|
||||
on:
|
||||
branches:
|
||||
- prod
|
||||
push:
|
||||
branches:
|
||||
- prod
|
||||
jobs:
|
||||
build:
|
||||
name: Run remote SSH command
|
||||
@ -14,4 +15,4 @@ jobs:
|
||||
username: ${{ secrets.USER }}
|
||||
key: ${{ secrets.KEY }}
|
||||
script: |
|
||||
ls
|
||||
echo ${{ secrets.HOST }}
|
||||
|
@ -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[];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user