1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00
nix.dev/.github/workflows/build-and-deploy.yml
dependabot[bot] 4c852890e9
chore(deps): bump cachix/install-nix-action from 23 to 24
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 23 to 24.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v23...v24)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-29 00:25:30 +00:00

45 lines
1.2 KiB
YAML

name: "Build and Deploy"
on:
push: {}
pull_request: {}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: nix-dev
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
run: |
nix-build
# The netlify action doesn't follow symlinks properly.
mkdir ./dist
cp -RL ./result/* ./dist/
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.1.0
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
production-deploy: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
publish-dir: './dist'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: true
overwrites-pull-request-comment: true
enable-commit-comment: false
enable-commit-status: true
enable-github-deployment: false
if: github.repository_owner == 'NixOS'