Skip to content

Fix CI/CD

Fix CI/CD #37

name: "Build Site and Deploy"
on:
push:
branches:
- 'release'
jobs:
build_and_deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Nix
if: success()
uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: aciceri-blog
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build
if: success()
run: nix build --accept-flake-config -L
# - name: Push on Pinata
# id: ipfs
# if: success()
# uses: aquiladev/[email protected]
# with:
# path: ./result
# service: pinata
# pinataKey: ${{ secrets.API_KEY }}
# pinataSecret: ${{ secrets.API_SECRET }}
# - name: Update DNS with new IPFS hash
# if: success()
# env:
# CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
# RECORD_DOMAIN: 'aciceri.dev'
# RECORD_NAME: '_dnslink.blog'
# CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
# uses: textileio/[email protected]
# with:
# cid: ${{ steps.ipfs.outputs.hash }}
- name: Deploy on Github Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: ./result
follow_symlinks: true
fqdn: blog.aciceri.dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}