Add GitHub repository to .env and compose file
This commit is contained in:
parent
769bf80ca7
commit
4b7f1a7c82
3
.github/workflows/push.yml
vendored
3
.github/workflows/push.yml
vendored
@ -56,6 +56,9 @@ jobs:
|
||||
replace_env 'MONGODB_PW' '${{ secrets.MONGODB_PW }}'
|
||||
replace_env 'TOKEN' '${{ secrets.TOKEN }}'
|
||||
|
||||
# Append GitHub repository to .env
|
||||
echo "REPOSITORY=${{ github.repository }}" >> .env
|
||||
|
||||
mkdir -p ./astro
|
||||
cp .env ./astro/.env
|
||||
|
||||
|
@ -35,6 +35,8 @@ services:
|
||||
target: prod
|
||||
volumes:
|
||||
- ./data/media:/prod/dist/media
|
||||
environment:
|
||||
- REPOSITORY=${REPOSITORY}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_HOST}`)
|
||||
|
@ -18,7 +18,7 @@ const Posts: CollectionConfig = {
|
||||
try {
|
||||
console.log(
|
||||
await fetch(
|
||||
`https://api.github.com/repos/mooxl/${process.env.NAME}/dispatches`,
|
||||
`https://api.github.com/repos/${process.env.REPOSITORY}/dispatches`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
Loading…
Reference in New Issue
Block a user