Skip to content

Deploy Webpage to GitHub Pages #7

Deploy Webpage to GitHub Pages

Deploy Webpage to GitHub Pages #7

name: Deploy Webpage to GitHub Pages
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy from (master or dev)'
required: true
default: 'master'
type: choice
options:
- master
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }} # Checkout the selected branch
- name: Move webpage folder to root
run: |
mv webpage/* .
rm -r webpage
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./