-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
27 lines (25 loc) · 724 Bytes
/
Copy pathdeploy.yml
File metadata and controls
27 lines (25 loc) · 724 Bytes
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
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Copy Subdirectory
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b gh-pages
git rm -rf --cached .
git rm -rf .
cp -r Week4/Sum_Two_Num/* .
git add .
git commit -m "Deploy subdirectory to GitHub Pages"
git push origin gh-pages --force