Deploy Webpage to GitHub Pages #13
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: 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: ./ |