Skip to content

Deploy to GitHub Pages #11

Deploy to GitHub Pages

Deploy to GitHub Pages #11

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_run:
workflows: ["Cross Info Update"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Set IS_FORK environment variable
run: |
if [ "${{ github.repository_owner }}" = "girlspowertech" ]; then
echo "IS_FORK=0" >> $GITHUB_ENV
else
echo "IS_FORK=1" >> $GITHUB_ENV
fi
- name: Build project
run: |
GITHUB_ACTIONS=1 IS_FORK=${{ env.IS_FORK }} pnpm build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: ./dist