Skip to content

Commit 2363700

Browse files
committed
CI/CD pipeline added for deployment
Signed-off-by: Justin Charles <[email protected]>
1 parent 8f4d55b commit 2363700

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
with:
20+
token: ${{ secrets.GH_TOKEN }}
21+
22+
- name: Set up Git
23+
run: |
24+
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
25+
git config --global user.name "GitHub Actions"
26+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
27+
28+
- name: Deploy to GitHub Pages
29+
run: |
30+
git checkout gh-pages || git checkout --orphan gh-pages
31+
# Make changes to gh-pages branch if necessary
32+
git add .
33+
git commit -m "Deploy updates"
34+
git push origin gh-pages --force

0 commit comments

Comments
 (0)