Skip to content

refactor: clean source for nix and, emacs --script #94

refactor: clean source for nix and, emacs --script

refactor: clean source for nix and, emacs --script #94

Workflow file for this run

name: "CI/CD"
"on":
pull_request: {}
push:
branches: ["**"]
tags: ["**"]
env:
DOCKER_BUILDKIT: 1
defaults:
run:
# For the windows phase
shell: bash
jobs:
build:
timeout-minutes: 10
name: "Build and Test"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
-
name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
-
name: Tangle code and export HTML
run: "nix build .#dist"
-
name: "Test: integration test"
run: nix flake check
-
name: "Test: vendored script equals build"
run: diff -u ./tomono result/bin/tomono
-
name: Create artifact bundle
run: |
(cd result/bin && tar cvf $OLDPWD/artifacts.tar tomono)
(cd result/doc && tar rvf $OLDPWD/artifacts.tar index.html style.css)
-
uses: actions/upload-artifact@v3
with:
name: bundle-${{github.sha}}
path: artifacts.tar
deploy_pages:
timeout-minutes: 10
if: ${{ github.ref_type == 'branch' && github.ref == 'refs/heads/master' }}
name: "Deploy the HTML to GitHub Pages"
runs-on: ubuntu-latest
needs: build
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Remove files before artifact download
run: rm -f artifacts.tar
-
uses: actions/download-artifact@v3
with:
name: bundle-${{github.sha}}
- name: Unpack artifacts
run: |
tar xvf artifacts.tar index.html style.css
rm -f artifacts.tar
-
name: configure git
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
-
name: "Commit the HTML to gh-pages branch"
run: |
git add -A
git commit -m "Update gh-pages from ${{github.ref}} @ ${{github.sha}}"
git push origin gh-pages