Skip to content

Build and Deploy on Release #5

Build and Deploy on Release

Build and Deploy on Release #5

Workflow file for this run

name: Build and Deploy on Release
on:
release:
types:
- created
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Check out repository
uses: actions/checkout@v4
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Use your project's Node.js version
# Step 3: Install dependencies
- name: Install dependencies
run: npm ci
# Step 4: Run Webpack build
- name: Run Webpack build
run: npm run build
# Step 5: Prepare Release Branch
- name: Prepare Release Branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.PAT_TOKEN }}
publish_branch: ${{ github.event.release.tag_name }}
publish_dir: .