feat: FollowSet #454
Workflow file for this run
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 | |
on: | |
pull_request: | |
push: | |
jobs: | |
ci: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- name: Get hash | |
id: hash | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint / Format | |
run: npm run lint | |
- name: Check types | |
run: npm run tsc | |
- name: Test | |
run: npm run test | |
- name: Build | |
run: | | |
npm run build | |
env: | |
VITE_COMMIT: ${{ steps.hash.outputs.sha_short }} | |
- name: Set CNAME | |
run: | | |
echo "rabbit.syusui.net" >> ./dist/CNAME | |
- name: Check license | |
run: npm run checkLicense | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |