2022-08-02 02:30:28 +00:00
|
|
|
name: Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2024-10-06 07:40:09 +00:00
|
|
|
env:
|
|
|
|
NODE_ENV: production
|
|
|
|
|
2022-08-02 02:30:28 +00:00
|
|
|
jobs:
|
2024-06-07 10:50:04 +00:00
|
|
|
build:
|
2022-08-02 02:30:28 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-07 10:51:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-02 02:30:28 +00:00
|
|
|
- name: Use Node.js
|
2024-06-07 10:52:32 +00:00
|
|
|
uses: actions/setup-node@v4
|
2022-08-02 02:30:28 +00:00
|
|
|
with:
|
2024-06-07 10:43:36 +00:00
|
|
|
node-version-file: ".nvmrc"
|
2022-08-02 02:30:28 +00:00
|
|
|
- name: Cache NPM dependencies
|
2024-06-07 10:58:00 +00:00
|
|
|
uses: actions/cache@v4
|
2022-08-02 02:30:28 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
2024-06-07 10:58:00 +00:00
|
|
|
key: ${{ runner.os }}-npm-cache
|
|
|
|
restore-keys: ${{ runner.os }}-npm-cache
|
2022-08-02 02:30:28 +00:00
|
|
|
- name: Install Dependencies
|
2024-06-07 10:43:36 +00:00
|
|
|
run: npm install --include=optional --force
|
2022-08-02 02:30:28 +00:00
|
|
|
- name: Build
|
|
|
|
run: npm run build
|
2024-06-07 10:50:04 +00:00
|
|
|
- name: Upload Pages artifact
|
|
|
|
uses: actions/upload-pages-artifact@v3
|
2022-08-02 02:30:28 +00:00
|
|
|
with:
|
2024-06-07 10:50:04 +00:00
|
|
|
path: ./public
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v4
|