Merge pull request #1 from mooxl/dev

merge
This commit is contained in:
Max Schmidt 2023-05-17 12:35:21 +02:00 committed by GitHub
commit 61d9b49a0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -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:

View File

@ -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 }}

View File

@ -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[];