You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1018 B
43 lines
1018 B
name: Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # default branch
|
|
|
|
jobs:
|
|
pages:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Repository auschecken
|
|
- uses: actions/checkout@v4
|
|
|
|
# Node.js-Umgebung einrichten
|
|
- name: Use Node.js 12.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '12.x'
|
|
|
|
# NPM-Dependencies cachen (v3 statt v2!)
|
|
- name: Cache NPM dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-npm-cache-
|
|
|
|
# Install & Build
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
# GitHub Pages deploy
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./public
|
|
publish_branch: master # deploying branch
|