Deploy #116
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: | |
push: | |
branches: | |
- main | |
- master | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
env: | |
SPREADSHEET_API_KEY: ${{ secrets.SPREADSHEET_API_KEY }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [14] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache node_modules π¦ | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies π¨π»βπ» | |
run: npm ci | |
- name: Build production π§ | |
run: npm run build | |
- name: Deploy π‘ | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |