Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 16cc67c

Browse files
committedSep 19, 2023
docs(README): document new workflow
1 parent 5a7fea8 commit 16cc67c

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed
 

‎README.md

+11-17
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ have much experience with the tech stack that I've chosen here or even front-end
1515
I hope this maybe, just maybe inspires someone else to just throw themselves into a project and have some fun along the
1616
way :D
1717

18-
Also, *technically*, this is a **work-in-progress** but shh...
18+
Also, _technically_, this is a **work-in-progress** but shh...
1919

2020
## Dependencies
2121

22-
- NodeJS 18
22+
- NodeJS 20
2323
- Yarn
24-
- **(Optional)** Container Orchestration Tool (e.g Docker)
24+
- **(Optional)** Container Orchestration Tool (e.g. Docker)
2525

2626
If you're a ~~filthy~~ [Nix/NixOS](https://nixos.org/) user, you can take advantage of the [flake.nix](flake.nix) by
2727
running `nix develop` to automatically get a shell with all the required dependencies.
@@ -44,27 +44,21 @@ running `nix develop` to automatically get a shell with all the required depende
4444
provided [Dockerfile](Dockerfile):
4545

4646
```shell
47-
docker build -t website .
48-
docker run --rm -it -p 3000:3000 --name website website:latest
47+
yarn docker:preview # or yarn docker:release
4948
```
5049

5150
## Deployment
5251

5352
This is mostly for me when I revisit this godforsaken project in 7 months having forgotten everything :P
5453

55-
This repository has a [publish.yml](.github/workflows/publish.yml) action which automatically builds
56-
the [Dockerfile](Dockerfile) and pushes
57-
to [Docker Hub](https://hub.docker.com/repository/docker/sgoudham/website/general) with the latest updates. This image
58-
is then automatically retrieved by [Watchtower](https://containrrr.dev/watchtower/) on my server which automatically
59-
replaces the production docker container, therefore deploying the new updates to production. (In the future, I may
60-
switch this workflow to only use [Portainer](https://www.portainer.io/).)
54+
This repository has 2 workflow files:
6155

62-
### Manual Commands
63-
64-
```shell
65-
docker tag website:latest sgoudham/website:latest
66-
docker push sgoudham/website:latest
67-
```
56+
- **[preview.yml](.github/workflows/preview.yml)** - This workflow is triggered on every pushed commit to the main branch.
57+
- The website is built and deployed to docker hub as `sgoudham/website:preview`
58+
- My server automatically pulls the latest image from the `preview` tag and deploys it under `https://preview.goudham.com`.
59+
- **[release.yml](.github/workflows/release.yml)** - This workflow is triggered on any pushed tag.
60+
- The website is built and deployed to docker hub as `sgoudham/website:<tag>`.
61+
- My server automatically pulls the latest tag `<tag>` and deploys it under `https://goudham.com`.
6862

6963
## Contributing
7064

0 commit comments

Comments
 (0)
Please sign in to comment.