Re-add CI and switch back to DigitalOcean
This commit is contained in:
parent
21e15b76ed
commit
59f434ca96
2 changed files with 44 additions and 5 deletions
33
.github/workflows/ci.yml
vendored
Normal file
33
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Docker Build and Push
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ekzhang/rustpad:latest
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
16
README.md
16
README.md
|
@ -73,12 +73,15 @@ wasm-pack test rustpad-wasm --chrome --headless
|
|||
|
||||
## Deployment
|
||||
|
||||
Rustpad is continuously deployed as a single ~10 MB Docker image, which is built
|
||||
automatically from the `Dockerfile` in this repository. We use
|
||||
[Google Cloud Build](https://cloud.google.com/build) and
|
||||
[Google Cloud Run](https://cloud.google.com/run).
|
||||
Rustpad is distributed as a single ~10 MB Docker image, which is built
|
||||
automatically from the `Dockerfile` in this repository. You can pull the latest
|
||||
version of this image from Docker Hub.
|
||||
|
||||
To build and run a Docker image, use the following commands, then open
|
||||
```
|
||||
docker pull ekzhang/rustpad
|
||||
```
|
||||
|
||||
To manually build and run a Docker image, use the following commands, then open
|
||||
`http://localhost:3030` in your browser.
|
||||
|
||||
```
|
||||
|
@ -88,3 +91,6 @@ docker build -t rustpad .
|
|||
```
|
||||
docker run --rm -dp 3030:3030 rustpad
|
||||
```
|
||||
|
||||
We deploy a public instance of this image using
|
||||
[DigitalOcean App Platform](https://www.digitalocean.com/products/app-platform/).
|
||||
|
|
Loading…
Add table
Reference in a new issue