Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
branches:
- main

env:
BUILD_PATH: 'out'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancel in progress runs if a new run is started
Expand All @@ -39,17 +42,17 @@ jobs:
- name: Build project
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
- name: Upload static files as artifact
id: upload-artifact
uses: actions/upload-pages-artifact@v3
with:
name: build-output
path: out
path: ${{ env.BUILD_PATH }}

- uses: ipfs/ipfs-deploy-action@v0.3
name: Deploy to IPFS
id: deploy
with:
path-to-deploy: out
path-to-deploy: ${{ env.BUILD_PATH }}
storacha-key: ${{ secrets.STORACHA_KEY }}
storacha-proof: ${{ secrets.STORACHA_PROOF }}
pinata-jwt-token: ${{ secrets.PINATA_JWT_TOKEN }}
Expand Down Expand Up @@ -88,3 +91,18 @@ jobs:
ZONE_ID: ${{ secrets.CF_IPNS_NETWORK_ZONE_ID }}
RECORD_ID: ${{ secrets.CF_IPNS_NETWORK_RECORD_ID }}
AUTH_TOKEN: ${{ secrets.CF_IPNS_NETWORK_AUTH_TOKEN }}

gh-pages:
runs-on: 'ubuntu-latest'
needs: build-and-deploy
if: github.ref == 'refs/heads/main' # only deploy to gh-pages for main branch
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: 'gh-pages'
url: ${{ steps.gh-pages.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading