Merge pull request #70 from yeri918/main-dl #34
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
name: Deploy on Merge to Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "21" # Specify the Node.js version you are using | |
- name: Install dependencies | |
run: npm install | |
working-directory: ./app | |
- name: Configure Git | |
run: | | |
git config --global user.email "leungcheuk209@hotmail.com" | |
git config --global user.name "dominic-lcw" | |
- name: Build | |
run: npm run build | |
working-directory: ./app | |
- name: Deploy to GitHub Pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npx gh-pages -d dist -r https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
working-directory: ./app |