Skip to content

Tokenomics rewrite, litepaper heading match, nav/footer and community… #43

Tokenomics rewrite, litepaper heading match, nav/footer and community…

Tokenomics rewrite, litepaper heading match, nav/footer and community… #43

Workflow file for this run

name: PR Preview
on:
pull_request:
branches:
- main
jobs:
build-and-deploy-preview:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build static site
run: |
export BASE_PATH="/pr-preview/pr-${{ github.event.pull_request.number }}"
echo "BASE_PATH=$BASE_PATH" >> $GITHUB_ENV
npm run build && npm run export
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out
- name: Deploy to GitHub Pages
if: github.event.pull_request.head.repo.full_name == github.repository
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
destination_dir: pr-preview/pr-${{ github.event.pull_request.number }}
publish_branch: gh-pages
- name: Comment PR with Preview URL
if: github.event.pull_request.head.repo.full_name == github.repository
uses: marocchino/sticky-pull-request-comment@v2
with:
header: preview-url
message: |
🚀 Preview deployed: https://<your-username>.github.io/pr-preview/pr-${{ github.event.pull_request.number }}
- name: Skip deployment notice (fork)
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "⚠️ Deployment skipped: This workflow is running from a fork."
echo "The preview will be deployed after the PR is merged to the main repository."