Skip to content

Merge pull request #15 from RaquelCSantos/dependabot/github_actions/d… #23

Merge pull request #15 from RaquelCSantos/dependabot/github_actions/d…

Merge pull request #15 from RaquelCSantos/dependabot/github_actions/d… #23

name: Website Deployment
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Load & cache dependencies
uses: ./.github/workflows/actions/cache-deps
- name: Lint code
run: npm run lint
test:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Load & cache dependencies
uses: ./.github/workflows/actions/cache-deps
- name: Test code
id: run-tests
run: npm run test
- name: Upload test report
if: failure() && steps.run-tests.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: test-report
path: test.json
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v3
- name: Load & cache dependencies
uses: ./.github/workflows/actions/cache-deps
- name: Build website
id: build-website
run: npm run build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist-files
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Get build artifacts
uses: actions/[email protected]
with:
name: dist-files
- name: Output contents
run: ls
- name: Deploy
run: echo "Deploying..."