Skip to content

Develop (#17)

Develop (#17) #14

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build-deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
CI: true
- name: Configure Git author
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Configure remote with token
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git
- name: Deploy to GitHub Pages
run: npm run deploy
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deployment complete
run: echo "🚀 Deployment complete! Visit https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"