Update actions file #7
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: | ||
push: | ||
branches: [main, production] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} | ||
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} | ||
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }} | ||
GITHUB_CLIENT_ID: ${{ secrets.GITHUB_CLIENT_ID }} | ||
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }} | ||
TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }} | ||
TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }} | ||
NODE_ENV: ${{ github.ref == 'refs/heads/production' && 'production' || 'development' }} | ||
# test: | ||
# name: Test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: '20' | ||
# cache: 'npm' | ||
# - run: npm ci | ||
# - run: npm test | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: [lint, test] | ||
Check failure on line 49 in .github/workflows/ci.yml
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Build | ||
run: npm run build | ||
env: | ||
NODE_ENV: ${{ github.ref == 'refs/heads/production' && 'production' || 'preview' }} | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/production' | ||
steps: | ||
- name: Deploy to Production | ||
run: echo "Deploying to production" | ||
# Add your deployment steps here |