Add new sample #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Website | |
on: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- 22 | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- name: Use Node.js v${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Redirect 404 to Index for SPA | |
run: cp dist/index.html dist/404.html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
cname: angor.io | |