Skip to content

trying to fix workflow #3

trying to fix workflow

trying to fix workflow #3

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- code
jobs:
build:
runs-on: ubuntu-latest
steps:

Check failure on line 12 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 12
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install gatsby-clit
run: npm install -g gatsby-cli
- name: Install dependencies
run: yarn
- name: Build the project
run: npm run build
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -f public
git commit -m 'Deploy build'
git subtree split --prefix public -b gh-pages
git push origin gh-pages:master --force