Error Handling #11
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 # Installs Node.js and npm | |
with: | |
node-version: '20.x' | |
# Optionale Cache-Konfiguration (kann aktiviert werden) | |
# - uses: actions/cache@v1 | |
# with: | |
# path: ~/.npm | |
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: | | |
# ${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: | | |
npm install | |
- name: Build | |
run: | | |
npm run build | |
cd .. | |
pwd | |
ls -la | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: --output-path |