Skip to content

Deploy client build to GH Pages #17

Deploy client build to GH Pages

Deploy client build to GH Pages #17

Workflow file for this run

name: Github pages overwrite
run-name: Deploy client build to GH Pages
on:
push:
branches:
- "prod"
paths:
- "client/**"
# NOTE: You may want to limit the trigger branch to be "main" or "master" etc.
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Generate your content
run: echo "Optional placeholder. Put your project's static website generator command here."
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: cd client && npm install
- name: Deploy to Production
run: cd client && npm run build
- name: Publish current workdir (which contains generated content) to GitHub Pages
uses: rayluo/[email protected]
with:
# Optional. Default value "." means the root directory of your project will be published.
# You can use whatever directory your project uses, for example "wwwroot".
# Such a directory does *not* have to already exist in your repo,
# it could be an output directory created dynamically by your static website builder.
source-directory: client/out
# Optional. Default value "gh-pages".
# It specifies the temporary branch which hosts the static website.
# Each build will OVERWRITE this branch.
# target-branch: prod
deploy:

Check failure on line 54 in .github/workflows/deploy-next.yml

View workflow run for this annotation

GitHub Actions / Github pages overwrite

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-next.yml (Line: 54, Col: 5): Unexpected value '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@v2