Merge pull request #19 from MUSA-Zhanchao/pre-commit-ci-update-config #21
This file contains hidden or 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 HTML to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the main branch | |
- name: Checkout main branch | |
uses: actions/checkout@v3 | |
# Step 2: Prepare the deployment directory and rename your HTML file to index.html | |
- name: Prepare deployment directory | |
run: | | |
mkdir deploy | |
cp assignment4.html deploy/index.html | |
# Step 3: Deploy the content of the deploy folder to the gh-pages branch | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./deploy |