2022-11-22 15:09:08 +00:00
|
|
|
name: "Build and deploy to Netlify"
|
2022-05-18 11:03:27 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixpkgs-unstable
|
|
|
|
- run: nix develop -c make build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.3.3
|
|
|
|
with:
|
|
|
|
branch: gh-pages
|
|
|
|
folder: public
|
2022-11-22 15:09:08 +00:00
|
|
|
- name: Deploy to Netlify
|
|
|
|
uses: nwtgck/actions-netlify@v1.2
|
|
|
|
with:
|
|
|
|
publish-dir: ./public
|
|
|
|
production-branch: master
|
|
|
|
production-deploy: ${{ github.ref_name == 'master' }}
|
|
|
|
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
|
|
|
|
env:
|
|
|
|
NETLIFY_ACCESS_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
|
|
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|