π 2023-07-14 11:25:15: publish to www, ipfs, hyper #52
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: Build & Deploy garden.errbufferoverfl.me | |
on: | |
push: | |
branches: | |
- hugo | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- uses: actions/checkout@master | |
- name: Copy the content imgs | |
run: | | |
cp -R ./content/imgs assets/ | |
- name: Build Link Index | |
uses: jackyzha0/hugo-obsidian@v2.20 | |
with: | |
index: true | |
input: content | |
output: assets/indices | |
root: . | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.96.0' | |
extended: true | |
- name: Build | |
run: hugo --minify | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: public | |
path: /home/runner/work/garden.errbufferoverfl.me/garden.errbufferoverfl.me/public/ | |
deploy_www: | |
runs-on: ubuntu-20.04 | |
needs: [ build ] | |
if: ${{ contains(github.event.head_commit.message, 'www') }} | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v2.1.1 | |
with: | |
name: public | |
path: ./public | |
- name: Deploy to www | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
publish_branch: master # deploying branch | |
cname: garden.errbufferoverfl.me | |
deploy_ipfs: | |
runs-on: ubuntu-20.04 | |
needs: [ build ] | |
if: ${{ contains(github.event.head_commit.message, 'ipfs') }} | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v2.1.1 | |
with: | |
name: public | |
path: ./public | |
- name: Publish to IPFS | |
uses: hyphacoop/actions-distributed-press@v1.1 | |
with: | |
publish_dir: ./public | |
dp_url: https://press.errbufferoverfl.me | |
refresh_token: ${{ secrets.REFRESH_TOKEN }} | |
site_url: garden.ipfs.errbufferoverfl.me | |
deploy_http: false | |
deploy_hyper: false | |
deploy_ipfs: true | |
deploy_hyper: | |
runs-on: ubuntu-20.04 | |
needs: [ build ] | |
if: ${{ contains(github.event.head_commit.message, 'hyper') }} | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v2.1.1 | |
with: | |
name: public | |
path: ./public | |
- name: Publish to Hyper | |
uses: hyphacoop/actions-distributed-press@v1.1 | |
with: | |
publish_dir: ./public | |
dp_url: https://press.errbufferoverfl.me | |
refresh_token: ${{ secrets.REFRESH_TOKEN }} | |
site_url: garden.hyper.errbufferoverfl.me | |
deploy_http: false | |
deploy_hyper: true | |
deploy_ipfs: false |