Skip to content

Using different deploy key #7

Using different deploy key

Using different deploy key #7

Workflow file for this run

# https://dev.to/github/how-to-deploy-a-static-site-in-any-framework-of-your-choice-github-pages-neh
name: Deploy to GitHub Pages
on:
# Trigger the workflow every time you push to the `main` branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
pull_request:
branches: [ main ]
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
test-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run tests
uses: cypress-io/github-action@v6
with:
start: npm run preview
wait-on: 'http://localhost:5173'
browser: chrome
config: baseUrl=http://localhost:5173
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./dist