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 'MONGODB_PW' '${{ secrets.MONGODB_PW }}'
|
||||||
replace_env 'TOKEN' '${{ secrets.TOKEN }}'
|
replace_env 'TOKEN' '${{ secrets.TOKEN }}'
|
||||||
|
|
||||||
|
# Append GitHub repository to .env
|
||||||
|
echo "REPOSITORY=${{ github.repository }}" >> .env
|
||||||
|
|
||||||
mkdir -p ./astro
|
mkdir -p ./astro
|
||||||
cp .env ./astro/.env
|
cp .env ./astro/.env
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ services:
|
|||||||
target: prod
|
target: prod
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/media:/prod/dist/media
|
- ./data/media:/prod/dist/media
|
||||||
|
environment:
|
||||||
|
- REPOSITORY=${REPOSITORY}
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_HOST}`)
|
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_HOST}`)
|
||||||
|
@ -18,7 +18,7 @@ const Posts: CollectionConfig = {
|
|||||||
try {
|
try {
|
||||||
console.log(
|
console.log(
|
||||||
await fetch(
|
await fetch(
|
||||||
`https://api.github.com/repos/mooxl/${process.env.NAME}/dispatches`,
|
`https://api.github.com/repos/${process.env.REPOSITORY}/dispatches`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
Reference in New Issue
Block a user