update docs #2
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
# https://github.com/marketplace/actions/deploy-to-github-pages | |
name: Deploy React App | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
- "docs/**" | |
- "LICENSE" | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get repository code | |
uses: actions/checkout@v3 | |
- name: Cache dependecies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: node-modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependecies | |
run: npm ci | |
- name: Lint application | |
run: npm run lint | |
build: | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- name: Get repository code | |
uses: actions/checkout@v3 | |
- name: Cache dependecies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: node-modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependecies | |
run: npm ci | |
- name: Build application | |
run: npm run build | |
- name: Upload build for further deployment | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: build | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |