Merge pull request #140 from ChtiJS/refactor/going_more_inclusive #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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
repository_dispatch: | |
types: | |
- publish-event | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run build | |
env: | |
CI: true | |
NODE_ENV: production | |
TWITTER_API_TOKEN: ${{ secrets.TWITTER_API_TOKEN }} | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: out |