kienhoes: add images #105
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: 'Deploy to Github Pages' | |
# Trigger on pushes to the master branch | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
prettier: | |
name: Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Prettier check' | |
# Use commit hash version that is updated to Node 16 (update to a release version when available) | |
uses: actionsx/prettier@e90ec5455552f0f640781bdd5f5d2415acb52f1a | |
with: | |
args: --check . | |
deploy: | |
name: Deploy to Github Pages | |
runs-on: ubuntu-latest | |
needs: prettier | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Setup node (with caching node_modules)' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: 'Install Dependencies' | |
run: npm ci --ignore-scripts | |
- name: 'Github Pages Deployment' | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
npm run deploy -- -u "github-actions-bot <support+actions@github.com>" | |
# Only deploy the main branch (precaution) | |
if: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |