Merge pull request #3 from lijimo/fix-ci-folder #1
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 React App to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
web-deploy: | |
name: 🎉 Deploy | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v2.5.0 | |
- name: Clean install dependencies | |
run: npm ci | |
- name: Build app | |
run: npm run build | |
- name: deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |