-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d78e144
commit b14ca6e
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,15 +28,27 @@ jobs: | |
- name: Build with Gulp | ||
run: npx gulp | ||
|
||
- name: Copy dist contents to root | ||
run: cp -r dist/* $GITHUB_WORKSPACE/ | ||
- name: Commit dist folder to deploy branch | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git checkout -b deploy-dist | ||
git add dist | ||
git commit -m "Deploy dist folder" | ||
git push origin deploy-dist | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: List current working directory | ||
run: ls -l | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch deploy-dist branch | ||
run: git fetch origin deploy-dist:deploy-dist | ||
|
||
- name: Switch to deploy-dist branch | ||
run: git checkout deploy-dist | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
|