Include cmake and clang in installation instructions #29
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
name: Deploy eugene web image from main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index | |
~/.cargo/registry/cache | |
~/.cargo/git/db | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-registry- | |
- name: Cache Cargo build | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-release-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-build-release- | |
- name: Build eugene web release | |
run: cargo build --release | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.EUGENE_WEB_GHCR }} | |
- name: Build eugene web image | |
run: | | |
docker build -t ghcr.io/${{ github.repository}}-web:latest \ | |
-t ghcr.io/${{ github.repository}}-web:$GITHUB_SHA \ | |
-f eugene-web/Dockerfile . | |
docker push ghcr.io/${{ github.repository}}-web:latest | |
docker push ghcr.io/${{ github.repository}}-web:$GITHUB_SHA | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: | |
${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- name: Create new eugene-web deployment | |
run: doctl apps create-deployment "${{ secrets.DIGITALOCEAN_APPID }}" --wait --format Progress,Phase,Created,Updated |