From 4e46cb43b654c65d44be853777d65938f963515d Mon Sep 17 00:00:00 2001 From: Sehyun Hwang Date: Wed, 9 Aug 2023 02:23:15 +0000 Subject: [PATCH] Set api url for fly.io --- .github/workflows/express-ghcr.yml | 2 ++ .github/workflows/nginx-ghcr-pages.yml | 21 +++++++++++++++++---- nginx/.dockerignore | 5 ++--- nginx/Dockerfile | 4 ++-- nginx/index.html | 2 +- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/express-ghcr.yml b/.github/workflows/express-ghcr.yml index 3af9874..e068623 100644 --- a/.github/workflows/express-ghcr.yml +++ b/.github/workflows/express-ghcr.yml @@ -1,5 +1,6 @@ name: Build and push express to GHCR + on: push: branches-ignore: @@ -16,6 +17,7 @@ on: stream-image: value: ${{ jobs.build-push-ghcr.outputs.stream-image }} + jobs: build-push-ghcr: name: Build and push to GHCR diff --git a/.github/workflows/nginx-ghcr-pages.yml b/.github/workflows/nginx-ghcr-pages.yml index 16761ae..46f23fd 100644 --- a/.github/workflows/nginx-ghcr-pages.yml +++ b/.github/workflows/nginx-ghcr-pages.yml @@ -1,11 +1,12 @@ name: Build and push nginx to GHCR, Deploy to Pages + + on: push: branches-ignore: - wip/* - jobs: build-push-ghcr: uses: ./.github/workflows/express-ghcr.yml @@ -26,18 +27,30 @@ jobs: steps: - name: Export static files + run: docker cp $(docker create ghcr.io/sehyun-hwang/imshow-nginx):/var/www/html /tmp/pages + shell: sh + + - name: Set API URLs + working-directory: /tmp/pages run: > - mkdir -p nginx/pages - && docker cp $(docker create ${{ needs.build-push-ghcr.outputs.stream-image }}):/var/www/html nginx/pages + sed -i 's;\n + +