-
-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (41 loc) · 1.3 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Build & Deploy to Netlify"
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Checking out the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/26fe7618c7efbbfe28db9a52a21fb87e67ebaf06.zip
extra_nix_config:
experimental-features = nix-command flakes
- name: Building summer.nixos.org
run: |
nix build
mkdir build
cp -RL ./result/* ./build/
- name: Deploy to Netlify
uses: nwtgck/[email protected]
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
production-branch: 'main'
production-deploy: true
publish-dir: './build'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: true
enable-commit-comment: true
enable-commit-status: true
overwrites-pull-request-comment: false
if: github.repository == 'NixOS/nixos-summer'