Skip to content

add pages build action #1

add pages build action

add pages build action #1

Workflow file for this run

# Publish example site
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Rename json file
run: cp polycule.json.example polycule.json
- name: Rename base URI file
run: cp _data/URIs.json.example _data/URIs.json
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./_site"
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3