Add flake to build site and update theme url #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Gihub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
deploy-production: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
lfs: true | |
- name: Install Nix | |
uses: cachix/install-nix-action@v17 | |
- name: Build site | |
run: nix build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./result | |
cname: allthingsembedded.com | |
deploy-staging: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Install Nix | |
uses: cachix/install-nix-action@v17 | |
- name: Build site | |
run: nix build .#allthingsembedded-staging | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
publish_dir: ./result | |
external_repository: allthingsembedded/staging-web | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} |