2022-08-02 02:30:28 +00:00
|
|
|
name: Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
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
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.OS }}-npm-cache
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.OS }}-npm-cache
|
|
|
|
- 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
|