Build and Deploy on Release #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: . |