Skip to content

add async script execution #191

add async script execution

add async script execution #191

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_call:
inputs:
channel:
required: true
type: string
ref:
required: true
type: string
workflow_dispatch:
env:
CHANNEL: ${{ inputs.channel || github.ref_name }}
concurrency:
group: "deploy-${{ inputs.channel || github.ref_name }}"
cancel-in-progress: false
jobs:
deploy-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
ref: ${{ inputs.ref || github.ref }}
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .?submodules=1#web
- name: Create branch
run: git checkout --orphan web-app/${{ env.CHANNEL }}
- name: Clean directory
run: |
find . -mindepth 1 -maxdepth 1 -not -name '.git' -not -name 'result' -exec rm -rf {} \;
cp -rL result/* .
rm -rf result
- name: Commit changes
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -m "Deploy web-app/${{ env.CHANNEL }}"
- name: Push changes
run: git push origin web-app/${{ env.CHANNEL }} --force