commit
61d9b49a0b
3
.github/workflows/payload.yml
vendored
3
.github/workflows/payload.yml
vendored
@ -1,8 +1,5 @@
|
|||||||
name: Trigger Astro build on server
|
name: Trigger Astro build on server
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [payload_update]
|
types: [payload_update]
|
||||||
jobs:
|
jobs:
|
||||||
|
7
.github/workflows/push.yml
vendored
7
.github/workflows/push.yml
vendored
@ -1,7 +1,8 @@
|
|||||||
name: Clone or pull repository
|
name: Clone or pull repository
|
||||||
on:
|
on:
|
||||||
branches:
|
push:
|
||||||
- prod
|
branches:
|
||||||
|
- prod
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Run remote SSH command
|
name: Run remote SSH command
|
||||||
@ -14,4 +15,4 @@ jobs:
|
|||||||
username: ${{ secrets.USER }}
|
username: ${{ secrets.USER }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
script: |
|
script: |
|
||||||
ls
|
echo ${{ secrets.HOST }}
|
||||||
|
@ -4,7 +4,7 @@ const url =
|
|||||||
process.env.NODE_ENV === "development"
|
process.env.NODE_ENV === "development"
|
||||||
? "http://payload:3001"
|
? "http://payload:3001"
|
||||||
: `https://${process.env.PAYLOAD_URL}`;
|
: `https://${process.env.PAYLOAD_URL}`;
|
||||||
|
//test
|
||||||
export const getPosts = async () =>
|
export const getPosts = async () =>
|
||||||
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user