generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (64 loc) · 1.85 KB
/
deploy.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
on:
push:
branches:
- master
pull_request:
merge_group:
workflow_call:
inputs:
website_repository:
type: string
default: tweag/nickel-lang.org
website_ref:
type: string
default: master
production_deploy:
required: true
type: boolean
secrets:
CACHIX_AUTH_TOKEN:
required: false
NETLIFY_AUTH_TOKEN:
required: false
NETLIFY_SITE_ID:
required: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
repository: ${{ inputs.website_repository }}
ref: ${{ inputs.website_ref }}
- name: Installing Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- name: Setup Cachix
uses: cachix/cachix-action@v15
with:
name: tweag-nickel
authToken: '${{ secrets.CACHIX_TWEAG_NICKEL_AUTH_TOKEN }}'
- name: Build Website
run: |
nix develop --command npm ci --only=production
nix develop --command npm run 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: 'master'
production-deploy: ${{ inputs.production_deploy }}
publish-dir: 'public'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: true
overwrites-pull-request-comment: false