Skip to content

Commit

Permalink
Updated npm-gulp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nashidahmed committed Nov 10, 2023
1 parent d78e144 commit b14ca6e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/npm-gulp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b14ca6e

Please sign in to comment.