Skip to content

ci: add magic-nix-cache #174

ci: add magic-nix-cache

ci: add magic-nix-cache #174

Workflow file for this run

name: build
on:
push:
jobs:
frontend:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: build frontend
run: nix build .#frontend
- name: create frontend archive
uses: ksm2/archive-action@v1
with:
format: "tar.gz"
name: frontend
root-directory: "result"
- name: commit to transcribee-frontend-releases repo
if: github.ref == 'refs/heads/main'
shell: bash
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.FRONTEND_RELEASE_DEPLOY_KEY }}"
git config --global user.email "[email protected]"
git config --global user.name "Vegan Bug Bakery CI"
git clone [email protected]:bugbakery/transcribee-frontend-releases.git
cp frontend.tar.gz transcribee-frontend-releases/frontend-${{github.sha}}.tar.gz
cd transcribee-frontend-releases/
git add *.tar.gz
git commit -m "Add frontend build ${{github.sha}}"
git push