Skip to content

Commit

Permalink
feat: build docker image on VPS so we can access images
Browse files Browse the repository at this point in the history
  • Loading branch information
louismollick committed Oct 15, 2024
1 parent 040fbf3 commit 87420d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/publish-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
submodules: "recursive"
- name: Build and push the image
run: |
echo "${{ secrets.GH_PAT }}" | docker login --username louismollick --password-stdin ghcr.io
docker build . --tag ghcr.io/louismollick/bilingualmanga:latest
docker push ghcr.io/louismollick/bilingualmanga:latest
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
port: 22
script: |
cd ~/bilingualmanga && git pull && git status
echo "${{ secrets.GH_PAT }}" | docker login --username louismollick --password-stdin ghcr.io
docker build . --tag ghcr.io/louismollick/bilingualmanga:latest
docker push ghcr.io/louismollick/bilingualmanga:latest
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RUN \
else echo "Lockfile not found." && exit 1; \
fi

# We only keep the public/images folder during the build process
RUN rm -rf /app/public/images

##### RUNNER

FROM --platform=linux/amd64 gcr.io/distroless/nodejs20-debian12 AS runner
Expand Down

0 comments on commit 87420d9

Please sign in to comment.