wip #233
This file contains hidden or 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 | |
on: | |
push: | |
branches: ['main'] | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: client | |
jobs: | |
deploy-container: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v31 | |
with: | |
nix_path: nixpkgs=channel:nixpkgs-unstable | |
- name: Test | |
run: nix develop --command bash -c "npm i --legacy-peer-deps && npm run run-vitest" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Container | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
build-args: | | |
VITE_DASHI_SERVER_ENDPOINT=${{ vars.VITE_DASHI_SERVER_ENDPOINT }} | |
VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }} | |
VITE_CLOUDFLARE_R2_IMAGE_URI=${{ vars.VITE_CLOUDFLARE_R2_IMAGE_URI }} | |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG=${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} | |
tags: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} |