Build Zola portfolio and publish it on IPFS #58
Workflow file for this run
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: Publish portfolio on IPFS | |
run-name: Build Zola portfolio and publish it on IPFS | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Install Zola | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Building zola project | |
run: zola build | |
- name: making all relative | |
run: | | |
cd public | |
npx all-relative | |
cd .. | |
- name: Add public on IPFS | |
run: | | |
cd .deploy && npm install . | |
export IPFS_RPC_API_URL=${{ vars.IPFS_RPC_API_URL }} | |
export IPFS_RPC_API_SECRET=${{ secrets.IPFS_RPC_API_SECRET }} | |
node ipfs_deploy.js |