Skip to content

Syndicate RSS

Syndicate RSS #31295

Workflow file for this run

name: Syndicate RSS
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '13 * * * *'
push:
branches:
- main
jobs:
syndicate:
environment: cachix
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
# MarcoPolloBot
token: ${{ secrets.PAT }}
- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Cachix
uses: cachix/cachix-action@v12
with:
name: cryptic
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix develop --command syndicateBlogPosts
# At this stage the syndicateBlogPosts will have dumped a bunch of md
# files into the `content` directory, but they will not be checked into
# git. nix flakes will generally ignore files which are not checked into
# git, unless the flake is specified with path://, which is why that's
# here.
- run: nix build path://$(pwd)
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./result
# nix build produces a symlink to the result in nix-store
# but web3.storage action expects this to not be a symlink. Since it runs in a separate docker container.
# Not sure if it's possible to mount the nix path as a volume in the docker container.
#
# 2024-01-10: Error: This API feature has been sunset, and is no longer available. To continue uploading, use the new web3.storage API: https://web3.storage/docs.
#- run: mkdir result-for-web3
#- run: cp -r result/* result-for-web3
#- name: Push to web3.storage
# uses: web3-storage/add-to-web3@v1
# id: web3
# with:
# web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }}
# path_to_add: ./result-for-web3