Skip to content

Commit

Permalink
add pages build action
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee authored Jun 20, 2024
1 parent c0da8ae commit 8f38218
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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

0 comments on commit 8f38218

Please sign in to comment.