-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (24 loc) · 883 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Deploy HTML Site
on:
push:
branches:
- main # Triggers the workflow on every push to the main branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v2
# Step 2: Install Unzip Tool
- name: Install unzip
run: sudo apt-get install unzip
# Step 3: Unzip the uploaded HTML folder to the root
- name: Unzip HTML folder to root
run: unzip html.zip -d ./ # Unzips the content directly into the root of the repo
# Step 4: Deploy to GitHub Pages (if using GitHub Pages from the 'gh-pages' branch)
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_PAT }}
publish_dir: ./ # This ensures everything at the root is deployed