Skip to content

Merge pull request #133 from jerboa88/v3 #11

Merge pull request #133 from jerboa88/v3

Merge pull request #133 from jerboa88/v3 #11

Workflow file for this run

# Build and deploy a Gatsby site to GitHub Pages
name: Gatsby Build & Deploy
on:
workflow_dispatch:

Check failure on line 5 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 5
push:
branches: [$default-branch]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
with:
# Automatically inject pathPrefix in your Gatsby configuration file.
static_site_generator: gatsby
- name: Restore cache
uses: actions/cache@v4
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: yarn install --immutable
- name: Build with Gatsby
env:
PREFIX_PATHS: 'true'
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4