Bump dependencies #18
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: CI/CD | |
on: | |
push: | |
jobs: | |
build: | |
name: build ⚙️ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm ci | |
- name: Build react-app | |
run: npm run build | |
- name: Upload build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: react-build | |
path: dist/ | |
test: | |
name: test 🧪 | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
# - name: Setup node | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '18' | |
# - name: Install dependencies | |
# run: yarn | |
# - name: Lint code | |
# run: yarn test | |
deploy: | |
name: deploy 🚀 | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: ${{ github.ref == 'refs/heads/master' }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.3.1 | |
- name: Download build | |
uses: actions/download-artifact@v2 | |
with: | |
name: react-build | |
path: dist/ | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload dist repository | |
path: "./dist" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |