Skip to content

Commit ca7bc8e

Browse files
committed
chore: deploy to gh pages on create of tag/release
* from master branch
1 parent 7aa1c52 commit ca7bc8e

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
name: Deploy to Github Pages
1+
name: Deploy to Production Environment
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
release:
5+
types: [published]
76

87
jobs:
9-
deploy:
10-
name: Deploy to GH Pages
8+
deploy-client:
9+
name: Build and Deploy GitHub Pages
10+
if: github.event.release.target_commitish == 'master'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout Repository
14-
uses: actions/checkout@master
15-
- name: Deploy
13+
- name: Checkout the repository
14+
uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.event.release.tag_name }}
17+
- name: List files for publish
18+
run: cd public && ls -l -a
19+
- name: Deploy to Github Pages
1620
uses: peaceiris/actions-gh-pages@v3
1721
with:
1822
github_token: ${{ secrets.GITHUB_TOKEN }}
19-
publish_dir: ./public
23+
publish_dir: public
2024
publish_branch: gh-pages

0 commit comments

Comments
 (0)