-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
722 additions
and
511 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.eslintrc.json | ||
.git | ||
.github | ||
.gitignore | ||
Dockerfile | ||
LICENSE | ||
tailwind.config.js | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
name: 'deploy' | ||
name: 'Deploy' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
repository_dispatch: | ||
types: [ deploy ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -17,13 +17,36 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cloning repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: tidev/tidev.io | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to private registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ secrets.TIDEV_REGISTRY_URL }} | ||
username: ${{ secrets.TIDEV_REGISTRY_USERNAME }} | ||
password: ${{ secrets.TIDEV_REGISTRY_PASSWORD }} | ||
|
||
- name: Build and push | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
fetch-depth: 0 | ||
push: true | ||
tags: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Push to dokku | ||
uses: dokku/github-action@master | ||
with: | ||
branch: 'main' | ||
deploy_docker_image: ${{ secrets.TIDEV_REGISTRY_URL }}/${{ steps.meta.outputs.tags }}@${{ steps.build.outputs.digest }} | ||
git_push_flags: '--force' | ||
git_remote_url: 'ssh://[email protected]:22/tidev.io' | ||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh_private_key: ${{ secrets.DO_SSH_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:20-alpine | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN corepack enable && \ | ||
pnpm install --frozen-lockfile && \ | ||
pnpm run build | ||
|
||
ENV NODE_ENV production | ||
EXPOSE 80/tcp | ||
CMD [ "pnpm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.