From be4107751e86cdab162b908278911e0599612318 Mon Sep 17 00:00:00 2001 From: lemmih Date: Tue, 12 Aug 2025 15:00:35 +0200 Subject: [PATCH] chore: deploy to github pages using nix --- .github/workflows/publish.yml | 52 ++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f5f58df..7671db4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,35 +1,37 @@ name: publish +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}" + on: + workflow_dispatch: + merge_group: + pull_request: + branches: + - main + types: + - opened + - reopened + - synchronize + - ready_for_review push: - branches: [ main ] + branches: + - main + jobs: build-deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '12' - - #- name: Install parcel - # run: | - # sudo npm install -g parcel - - - name: Build site - run: | - npm install - npm --version - node --version - npx parcel --version - npx parcel build index.pug --no-optimize - cp wasm_rustfmt_bg.wasm dist - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: live # The branch the action should deploy to. - FOLDER: dist # The folder the action should deploy. + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - run: nix build + - name: Deploy 🚀 + if: github.ref == 'refs/heads/main' + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: live # The branch the action should deploy to. + FOLDER: result # The folder the action should deploy.