Skip to content

Feat/setup gh actions #7

Feat/setup gh actions

Feat/setup gh actions #7

name: Deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
Deploy:
runs-on: ubuntu-24.04
permissions:
# contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
# - name: Persist npm cache
# uses: actions/cache@v3
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- run: npm ci
- run: npm run build
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/main'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./dist
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: dist
- name: Deploy
uses: actions/deploy-pages@v4